Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

madroid
/
phi2-4bit-mlx

Text Generation
MLX
Safetensors
English
phi
nlp
code
custom_code
Model card Files Files and versions
xet
Community

Instructions to use madroid/phi2-4bit-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use madroid/phi2-4bit-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("madroid/phi2-4bit-mlx")
    
    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 madroid/phi2-4bit-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 "madroid/phi2-4bit-mlx" --prompt "Once upon a time"
phi2-4bit-mlx
1.76 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
madroid's picture
madroid
Upload folder using huggingface_hub
f6de7a9 verified about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    578 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • added_tokens.json
    1.08 kB
    Upload folder using huggingface_hub about 2 years ago
  • config.json
    2.59 kB
    Upload folder using huggingface_hub about 2 years ago
  • configuration_phi.py
    9.26 kB
    Upload folder using huggingface_hub about 2 years ago
  • merges.txt
    456 kB
    Upload folder using huggingface_hub about 2 years ago
  • model.safetensors
    1.75 GB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • model.safetensors.index.json
    57.2 kB
    Upload folder using huggingface_hub about 2 years ago
  • modeling_phi.py
    62.7 kB
    Upload folder using huggingface_hub about 2 years ago
  • special_tokens_map.json
    441 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer.json
    2.11 MB
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer_config.json
    7.34 kB
    Upload folder using huggingface_hub about 2 years ago
  • vocab.json
    798 kB
    Upload folder using huggingface_hub about 2 years ago