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

  • Log In
  • Sign Up

dheeraj1508
/
phi-2-4bit

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

Instructions to use dheeraj1508/phi-2-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use dheeraj1508/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("dheeraj1508/phi-2-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 dheeraj1508/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 "dheeraj1508/phi-2-4bit" --prompt "Once upon a time"
phi-2-4bit
1.57 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
dheeraj1508's picture
dheeraj1508
Upload folder using huggingface_hub (#1)
0cadd01 verified almost 2 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 2 years ago
  • README.md
    615 Bytes
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • added_tokens.json
    1.08 kB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • config.json
    825 Bytes
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • merges.txt
    456 kB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model.safetensors
    1.57 GB
    xet
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model.safetensors.index.json
    57.3 kB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • special_tokens_map.json
    441 Bytes
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • tokenizer.json
    2.11 MB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • tokenizer_config.json
    7.37 kB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • vocab.json
    798 kB
    Upload folder using huggingface_hub (#1) almost 2 years ago