Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

ExaltedSlayer
/
unsloth-phi-4-mlx-mxfp4

Text Generation
MLX
Safetensors
English
llama
phi
phi4
unsloth
nlp
math
code
chat
conversational
mxfp4
4-bit precision
Model card Files Files and versions
xet
Community

Instructions to use ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 with MLX:

    # Make sure mlx-lm is installed
    # pip install --upgrade mlx-lm
    
    # Generate text with mlx-lm
    from mlx_lm import load, generate
    
    model, tokenizer = load("ExaltedSlayer/unsloth-phi-4-mlx-mxfp4")
    
    prompt = "Write a story about Einstein"
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )
    
    text = generate(model, tokenizer, prompt=prompt, verbose=True)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • LM Studio
  • Unsloth Studio

    How to use ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 with Unsloth Studio:

    Install Unsloth Studio (macOS, Linux, WSL)
    curl -fsSL https://unsloth.ai/install.sh | sh
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 to start chatting
    Install Unsloth Studio (Windows)
    irm https://unsloth.ai/install.ps1 | iex
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 to start chatting
    Using HuggingFace Spaces for Unsloth
    # No setup required
    # Open https://huggingface.co/spaces/unsloth/studio in your browser
    # Search for ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 to start chatting
    Load model with FastModel
    pip install unsloth
    from unsloth import FastModel
    model, tokenizer = FastModel.from_pretrained(
        model_name="ExaltedSlayer/unsloth-phi-4-mlx-mxfp4",
        max_seq_length=2048,
    )
  • MLX LM

    How to use ExaltedSlayer/unsloth-phi-4-mlx-mxfp4 with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "ExaltedSlayer/unsloth-phi-4-mlx-mxfp4"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "ExaltedSlayer/unsloth-phi-4-mlx-mxfp4"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "ExaltedSlayer/unsloth-phi-4-mlx-mxfp4",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
unsloth-phi-4-mlx-mxfp4
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
Cody Dostal
Update README.md
e88fc0b verified 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    17.6 kB
    Update README.md 7 months ago
  • chat_template.jinja
    462 Bytes
    Upload folder using huggingface_hub 7 months ago
  • config.json
    1.02 kB
    Upload folder using huggingface_hub 7 months ago
  • generation_config.json
    147 Bytes
    Upload folder using huggingface_hub 7 months ago
  • merges.txt
    917 kB
    Upload folder using huggingface_hub 7 months ago
  • model-00001-of-00002.safetensors
    5.36 GB
    xet
    Upload folder using huggingface_hub 7 months ago
  • model-00002-of-00002.safetensors
    2.42 GB
    xet
    Upload folder using huggingface_hub 7 months ago
  • model.safetensors.index.json
    55.4 kB
    Upload folder using huggingface_hub 7 months ago
  • special_tokens_map.json
    570 Bytes
    Upload folder using huggingface_hub 7 months ago
  • tokenizer.json
    7.15 MB
    Upload folder using huggingface_hub 7 months ago
  • tokenizer_config.json
    17.5 kB
    Upload folder using huggingface_hub 7 months ago
  • vocab.json
    1.61 MB
    Upload folder using huggingface_hub 7 months ago