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
-
Replace the `eos_token` with `<eot_id>`, to prevent model from going on unnecessarily long
Verified signature71578ca -
Upload folder using huggingface_hub (#1)
Verified signature- 981959cb1787aadcfd7d31b04eb31963fac8064c1531f7e57286fa6e96380f7c (c24974eb7b01f20b44016b61de0ff00f47bd3334) - 2eaf531bbde4958d0d0d8f0567028f76a6ba9708cc125fb8d7537f63fccf6d19 (1c9ea5b27d869ec85e985db19691136c5526e403) - c07b2bf2acbdc29528cb2f50c2345347ff7ff7411a3291a640db9c50c3cefc08 (2d16a8ad0d3cb24e943f81ef14e0c454bf56d23c) - 3284e24c97feee55e591cb57a1c50cc971b0ca614c312647b1146991422796c7 (e7027c293588c5ef22adbda4c93c13f680c8d673)66c519e -
initial commit
Verified signaturec6ca74f