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

  • Log In
  • Sign Up

jesusoctavioas
/
phi-2-mlx-4Bit

Text Generation
MLX
Safetensors
English
phi
nlp
code
4-bit precision
Model card Files Files and versions
xet
Community

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

  • Libraries
  • MLX

    How to use jesusoctavioas/phi-2-mlx-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("jesusoctavioas/phi-2-mlx-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 jesusoctavioas/phi-2-mlx-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 "jesusoctavioas/phi-2-mlx-4Bit" --prompt "Once upon a time"
phi-2-mlx-4Bit
1.57 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 13 commits
jesusoctavioas's picture
jesusoctavioas
Update README.md
6fef5f4 verified 5 months ago
  • .gitattributes
    1.52 kB
    initial commit 5 months ago
  • README.md
    1.1 kB
    Update README.md 5 months ago
  • added_tokens.json
    1.08 kB
    Upload added_tokens.json with huggingface_hub 5 months ago
  • config.json
    957 Bytes
    Upload config.json with huggingface_hub 5 months ago
  • generation_config.json
    124 Bytes
    Upload generation_config.json with huggingface_hub 5 months ago
  • merges.txt
    456 kB
    Upload merges.txt with huggingface_hub 5 months ago
  • model.safetensors
    1.57 GB
    xet
    Upload model.safetensors with huggingface_hub 5 months ago
  • model.safetensors.index.json
    57.3 kB
    Upload model.safetensors.index.json with huggingface_hub 5 months ago
  • special_tokens_map.json
    441 Bytes
    Upload special_tokens_map.json with huggingface_hub 5 months ago
  • tokenizer.json
    3.56 MB
    Upload tokenizer.json with huggingface_hub 5 months ago
  • tokenizer_config.json
    7.4 kB
    Upload tokenizer_config.json with huggingface_hub 5 months ago
  • vocab.json
    798 kB
    Upload vocab.json with huggingface_hub 5 months ago