Instructions to use mlx-community/phi-2-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/phi-2-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/phi-2-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/phi-2-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/phi-2-4bit" --prompt "Once upon a time"
- Atomic Chat
Commit History
-
5ec83c4b53e4b0a0acc1eef603069f95f966cc20644b8001a21775b234f8936e
Verified signature1c222ee
-
Update README.md (#2)
- Update README.md (47221ab976fe6d4906253735557db88836d68f30)b78af11 -
Create README.md (#1)
- Create README.md (9ff412f2fdea906307b33430be9634538c723cd2)2335477 -
Upload weights.npz with huggingface_hub
b8f2922 -
Upload config.json with huggingface_hub
91cef05 -
initial commit
38afb40