Instructions to use mlx-community/Llama-2-7b-chat-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Llama-2-7b-chat-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/Llama-2-7b-chat-mlx") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use mlx-community/Llama-2-7b-chat-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "mlx-community/Llama-2-7b-chat-mlx" --prompt "Once upon a time"
- Atomic Chat
float16
Browse files
README.md
CHANGED
|
@@ -13,5 +13,7 @@ tags:
|
|
| 13 |
|
| 14 |
Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B fine-tuned model, in `npz` format suitable for use in Apple's MLX framework.
|
| 15 |
|
|
|
|
|
|
|
| 16 |
Please, refer to the [original model card](https://huggingface.co/meta-llama/Llama-2-7b-chat/tree/main) for details on Llama 2.
|
| 17 |
|
|
|
|
| 13 |
|
| 14 |
Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B fine-tuned model, in `npz` format suitable for use in Apple's MLX framework.
|
| 15 |
|
| 16 |
+
Weights have been converted to `float16` from the original `bfloat16` type, because `numpy` is not compatible with `bfloat16` out of the box.
|
| 17 |
+
|
| 18 |
Please, refer to the [original model card](https://huggingface.co/meta-llama/Llama-2-7b-chat/tree/main) for details on Llama 2.
|
| 19 |
|