Views
No views yet
databricks/dbrx-instruct using mlx-lm version b80adbc
after DBRX support was added by Awni Hannun.python -m mlx_lm.convert --hf-path databricks/dbrx-instruct -q --upload-repo mlx-community/dbrx-instruct-4bit1pip install mlx --upgrade
2pip install mlx-lm --upgrade
3
4python -m mlx_lm.generate --model mlx-community/dbrx-instruct-4bit --prompt "Hello" --trust-remote-code --use-default-chat-template --max-tokens 500--use-default-chat-templatepython -m mlx_lm.generate --model dbrx-instruct-4bit --prompt "What's the difference between PCA vs UMAP vs t-SNE?" --trust-remote-code --use-default-chat-template --max-tokens 1000
pip install mlx-lm1from mlx_lm import load, generate
2
3model, tokenizer = load(
4 "mlx-community/dbrx-instruct-4bit",
5 tokenizer_config={"trust_remote_code": True}
6)
7
8chat = [
9 {"role": "user", "content": "What's the difference between PCA vs UMAP vs t-SNE?"},
10 # We need to add the Assistant role as well, otherwise mlx_lm will error on generation.
11 {"role": "assistant", "content": "The "},
12]
13
14prompt = tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=False)
15
16response = generate(model, tokenizer, prompt=prompt, verbose=True, temp=0.6, max_tokens=1500)