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

Duplicated from  lordjia/Qwen2-Cantonese-7B-Instruct

hyperkit
/
Qwen2-Cantonese-7B-Instruct-mlx

Text Generation
MLX
Safetensors
Chinese
English
qwen2
Cantonese
Qwen2
chat
conversational
Eval Results (legacy)
4-bit precision
Model card Files Files and versions
xet
Community

Instructions to use hyperkit/Qwen2-Cantonese-7B-Instruct-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use hyperkit/Qwen2-Cantonese-7B-Instruct-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("hyperkit/Qwen2-Cantonese-7B-Instruct-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 hyperkit/Qwen2-Cantonese-7B-Instruct-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 "hyperkit/Qwen2-Cantonese-7B-Instruct-mlx"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "hyperkit/Qwen2-Cantonese-7B-Instruct-mlx"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "hyperkit/Qwen2-Cantonese-7B-Instruct-mlx",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
Qwen2-Cantonese-7B-Instruct-mlx
Ctrl+K
Ctrl+K
  • 3 contributors
History: 3 commits
hyperkit's picture
hyperkit
Update README.md
ae056a2 verified 3 months ago
  • .gitattributes
    1.57 kB
    MLX conversion 3 months ago
  • README.md
    5.97 kB
    Update README.md 3 months ago
  • chat_template.jinja
    534 Bytes
    MLX conversion 3 months ago
  • config.json
    951 Bytes
    MLX conversion 3 months ago
  • generation_config.json
    243 Bytes
    Duplicate from lordjia/Qwen2-Cantonese-7B-Instruct 3 months ago
  • model.safetensors
    4.28 GB
    xet
    MLX conversion 3 months ago
  • model.safetensors.index.json
    51.8 kB
    MLX conversion 3 months ago
  • tokenizer.json
    11.4 MB
    xet
    MLX conversion 3 months ago
  • tokenizer_config.json
    444 Bytes
    MLX conversion 3 months ago