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

  • Log In
  • Sign Up

mlx-community
/
defog-llama-3-sqlcoder-8b

Text Generation
MLX
Safetensors
llama
code
conversational
Model card Files Files and versions
xet
Community
2

Instructions to use mlx-community/defog-llama-3-sqlcoder-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use mlx-community/defog-llama-3-sqlcoder-8b 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("mlx-community/defog-llama-3-sqlcoder-8b")
    
    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 mlx-community/defog-llama-3-sqlcoder-8b with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "mlx-community/defog-llama-3-sqlcoder-8b"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "mlx-community/defog-llama-3-sqlcoder-8b"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "mlx-community/defog-llama-3-sqlcoder-8b",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
defog-llama-3-sqlcoder-8b
16.1 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 3 commits
rishdotblog's picture
rishdotblog
Replace the `eos_token` with `<eot_id>`, to prevent model from going on unnecessarily long
71578ca verified almost 2 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 2 years ago
  • README.md
    600 Bytes
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • config.json
    700 Bytes
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model-00001-of-00004.safetensors
    5.3 GB
    xet
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model-00002-of-00004.safetensors
    5.35 GB
    xet
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model-00003-of-00004.safetensors
    4.36 GB
    xet
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model-00004-of-00004.safetensors
    1.05 GB
    xet
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • model.safetensors.index.json
    25.1 kB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • special_tokens_map.json
    301 Bytes
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • tokenizer.json
    9.09 MB
    Upload folder using huggingface_hub (#1) almost 2 years ago
  • tokenizer_config.json
    51 kB
    Replace the `eos_token` with `<eot_id>`, to prevent model from going on unnecessarily long almost 2 years ago