Instructions to use mlx-community/Meta-Llama-3-70B-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Meta-Llama-3-70B-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/Meta-Llama-3-70B-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/Meta-Llama-3-70B-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/Meta-Llama-3-70B-4bit" --prompt "Once upon a time"
- Atomic Chat
How much ram needed
#1
by satvikahuja - opened
will it work on 32gb m1 max?
@satvikahuja
Unified memory usage
- 8B 4bit : 7.5GB
- 8B 8bit : 10GB
- 70B 4bit : 39GB
- 70B 8bit : 70GB
So, it will cause swapping with 32gb😱
Here's an easy tool to calculate the ballpark memory needed: https://llm-calc.rayfernando.ai
Sadly, it looks like you'll need a hardware update (just like I do)