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

  • Log In
  • Sign Up

twelcone
/
pii-phi-mlx

Text Generation
MLX
Safetensors
phi3
conversational
custom_code
Model card Files Files and versions
xet
Community

Instructions to use twelcone/pii-phi-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use twelcone/pii-phi-mlx 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("twelcone/pii-phi-mlx")
    
    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
  • LM Studio
  • MLX LM

    How to use twelcone/pii-phi-mlx with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "twelcone/pii-phi-mlx"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "twelcone/pii-phi-mlx"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "twelcone/pii-phi-mlx",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
pii-phi-mlx
7.65 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
twelcone's picture
twelcone
Update README.md
b0b221a verified 8 months ago
  • .gitattributes
    1.52 kB
    initial commit 8 months ago
  • README.md
    2.78 kB
    Update README.md 8 months ago
  • added_tokens.json
    293 Bytes
    Upload MLX converted model 8 months ago
  • chat_template.jinja
    455 Bytes
    Upload MLX converted model 8 months ago
  • config.json
    4.17 kB
    Upload MLX converted model 8 months ago
  • configuration_phi3.py
    11.2 kB
    Upload MLX converted model 8 months ago
  • generation_config.json
    177 Bytes
    Upload MLX converted model 8 months ago
  • model-00001-of-00002.safetensors
    5.36 GB
    xet
    Upload MLX converted model 8 months ago
  • model-00002-of-00002.safetensors
    2.29 GB
    xet
    Upload MLX converted model 8 months ago
  • model.safetensors.index.json
    17.2 kB
    Upload MLX converted model 8 months ago
  • modeling_phi3.py
    73.8 kB
    Upload MLX converted model 8 months ago
  • special_tokens_map.json
    563 Bytes
    Upload MLX converted model 8 months ago
  • tokenizer.json
    3.62 MB
    Upload MLX converted model 8 months ago
  • tokenizer.model
    500 kB
    xet
    Upload MLX converted model 8 months ago
  • tokenizer_config.json
    2.96 kB
    Upload MLX converted model 8 months ago