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 Settings
- 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"} ] }' - Atomic Chat
Commit History
-
3284e24c97feee55e591cb57a1c50cc971b0ca614c312647b1146991422796c7
Verified signaturee7027c2 -
c07b2bf2acbdc29528cb2f50c2345347ff7ff7411a3291a640db9c50c3cefc08
Verified signature2d16a8a -
2eaf531bbde4958d0d0d8f0567028f76a6ba9708cc125fb8d7537f63fccf6d19
Verified signature1c9ea5b -
981959cb1787aadcfd7d31b04eb31963fac8064c1531f7e57286fa6e96380f7c
Verified signaturec24974e -
initial commit
Verified signaturec6ca74f