-
Notifications
You must be signed in to change notification settings - Fork 278
Add Mixtral #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Mixtral #2196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments! Please provide a demo colab
) | ||
self._query_dense.build(inputs_shape) | ||
|
||
self._key_dense = keras.layers.EinsumDense( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the layer names to be compatible with enable_lora
@keras_hub_export("keras_hub.models.MixtralBackbone") | ||
class MixtralBackbone(Backbone): | ||
""" | ||
The Mixtral Transformer core architecture with hyperparameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring first line should follow """
self.num_experts = num_experts | ||
self.top_k = top_k | ||
self.router_jitter_noise = router_jitter_noise | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove new line
preprocessor("League of legends") | ||
|
||
# Tokenize a batch of sentences. | ||
sentences = tf.constant(["Taco tuesday", "Fish taco please!"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why tf?
target_ids = keras.ops.roll(generation_ids, shift=-1, axis=1) | ||
|
||
embeddings = None | ||
with tf.GradientTape(watch_accessed_variables=True) as tape: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why tf?
This PR adds Mixtral to Keras Hub.
Reference