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

  • Log In
  • Sign Up

NLPnorth
/
snakmodel-7b-instruct-mlx-4bit

Text Generation
MLX
Safetensors
Danish
llama
conversational
4-bit precision
Model card Files Files and versions
xet
Community

Instructions to use NLPnorth/snakmodel-7b-instruct-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use NLPnorth/snakmodel-7b-instruct-mlx-4bit 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("NLPnorth/snakmodel-7b-instruct-mlx-4bit")
    
    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 NLPnorth/snakmodel-7b-instruct-mlx-4bit with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "NLPnorth/snakmodel-7b-instruct-mlx-4bit"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "NLPnorth/snakmodel-7b-instruct-mlx-4bit"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "NLPnorth/snakmodel-7b-instruct-mlx-4bit",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
snakmodel-7b-instruct-mlx-4bit
3.79 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
personads's picture
personads
Upload folder using huggingface_hub
4cc8b50 verified 10 months ago
  • .gitattributes
    1.52 kB
    initial commit 10 months ago
  • README-mlx.md
    142 Bytes
    Upload folder using huggingface_hub 10 months ago
  • README.md
    4.87 kB
    Upload folder using huggingface_hub 10 months ago
  • chat_template.jinja
    815 Bytes
    Upload folder using huggingface_hub 10 months ago
  • config.json
    866 Bytes
    Upload folder using huggingface_hub 10 months ago
  • generation_config.json
    111 Bytes
    Upload folder using huggingface_hub 10 months ago
  • model.safetensors
    3.79 GB
    xet
    Upload folder using huggingface_hub 10 months ago
  • model.safetensors.index.json
    52.4 kB
    Upload folder using huggingface_hub 10 months ago
  • snakmodel.png
    46.2 kB
    Upload folder using huggingface_hub 10 months ago
  • special_tokens_map.json
    551 Bytes
    Upload folder using huggingface_hub 10 months ago
  • tokenizer.json
    3.62 MB
    Upload folder using huggingface_hub 10 months ago
  • tokenizer_config.json
    950 Bytes
    Upload folder using huggingface_hub 10 months ago