Instructions to use mlx-community/CodeLlama-7b-Python-hf-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/CodeLlama-7b-Python-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-7b-Python-hf-4bit") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use mlx-community/CodeLlama-7b-Python-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-7b-Python-hf-4bit" --prompt "Once upon a time"
Upload folder using huggingface_hub
Upload folder using huggingface_hub
Multi commit ID: 882008e3444c48fec88f37f190191330672dd01ef7132f0cc393f0ebe7d64db1
Scheduled commits:
- Upload 1 file(s) totalling 4.0G (67ab0127cf0473a8be56fde169849664ea8ffcc95ea3ab0a5e02a7df49d6bb7c)
- Upload 6 file(s) totalling 2.3M (5f49aee9ac42ff2477edecb94f6bfa79ba61e8b700dbe7e59e3661e9d6381d7a)
This is a PR opened using the huggingface_hub library in the context of a multi-commit. PR can be commented as a usual PR. However, please be aware that manually updating the PR description, changing the PR status, or pushing new commits, is not recommended as it might corrupt the commit process. Learn more about multi-commits in this guide.
Multi-commit is now completed! You can ping the repo owner to review the changes. This PR can now be commented or modified without risking to corrupt it.
This is a comment posted using the huggingface_hub library in the context of a multi-commit. Learn more about multi-commits in this guide.
create_pr=False has been passed so PR is automatically merged.
This is a comment posted using the huggingface_hub library in the context of a multi-commit. Learn more about multi-commits in this guide.