Instructions to use mlx-community/CodeLlama-34b-Instruct-hf-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/CodeLlama-34b-Instruct-hf-4bit 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/CodeLlama-34b-Instruct-hf-4bit") 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/CodeLlama-34b-Instruct-hf-4bit 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/CodeLlama-34b-Instruct-hf-4bit" --prompt "Once upon a time"
- Atomic Chat
Download weights.00.safetensors from mlx-community/CodeLlama-34b-Instruct-hf-4bit: direct link, hf CLI and curl.
- Browser
- Download file 3.29 GB
-
https://huggingface.co/mlx-community/CodeLlama-34b-Instruct-hf-4bit/resolve/main/weights.00.safetensors
- Command line
-
hf download hf://mlx-community/CodeLlama-34b-Instruct-hf-4bit/weights.00.safetensors
-
curl -L -o weights.00.safetensors https://huggingface.co/mlx-community/CodeLlama-34b-Instruct-hf-4bit/resolve/main/weights.00.safetensors
3.29 GB
- Xet hash:
- 9e8d8ab5464a0fb9c040e5812e13ad2384791a2d1354acb50b8d9ce38379923e
- Size of remote file:
- 3.29 GB
- SHA256:
- de4a5fa26a83e9bada9f524000c663859a4cb8ccbabc4e05d7f89bb796cbba4e
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.