Keras Adds Llama 3.2 Support and Usage Guide
·2024.10.21 09:00
Key point
Through Keras Hub, Llama 3.2 models can be easily used across JAX, PyTorch, and TensorFlow backends.
Details
Llama 3.2 models are now officially supported via Keras Hub. Hugging Face's safetensors checkpoints can be loaded instantly without a separate conversion process, and are automatically converted at runtime when needed.
Key Features:
- Multi-backend support: By setting the
KERAS_BACKENDenvironment variable, you can choose to run the model on JAX, PyTorch, or TensorFlow. In particular, optimization using JAX and XLA compilation is possible. - User convenience (Batteries Included): A tokenizer is built in, allowing you to call
model.generate()by directly inputting strings, or train viamodel.fit()using a list of strings. - Automated preprocessing: The Preprocessor automatically handles adding text start/end tokens, padding, masking, and generating outputs for training.
- Fine-grained control: You can load the tokenizer, Backbone, and preprocessor separately, or directly access the model's lower layers.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.