Downloads · 30 days
41
11% of all-time downloads
MXLouis/Llama-Breeze2-8B-Instruct-text-only-mlx-4Bit
Llama-Breeze2-8B-Instruct-text-only-mlx-4Bit is a text generation model from MXLouis. Use it when you need the model to write or continue text. It is set up for transformers.
The Model MXLouis/Llama-Breeze2-8B-Instruct-text-only-mlx-4Bit was converted to MLX format from voidful/Llama-Breeze2-8B-Instruct-text-only using mlx-lm version 0.26.4.
Downloads · 30 days
41
11% of all-time downloads
All-time downloads
390
Public
Parameters
8B
4.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.5 GB · 100%
How the weights are stored.
U328B · 100%
From the Hugging Face model README
The Model MXLouis/Llama-Breeze2-8B-Instruct-text-only-mlx-4Bit was converted to MLX format from voidful/Llama-Breeze2-8B-Instruct-text-only using mlx-lm version 0.26.4.
pip install mlx-lm
Use the chat CLI and set a system prompt. If your model relies on custom tokenizer/chat template logic, also pass --trust-remote-code.
python -m mlx_lm chat \
--model MXLouis/Llama-Breeze2-8B-Instruct-text-only-mlx-4Bit \
--trust-remote-code \
--system-prompt "You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan."
Then type your query at the >> prompt, for example:
>> 請用繁體中文簡短介紹 Swift Package Index。
Programmatically include the system prompt in the messages and apply the chat template.
from mlx_lm import load, generate
model, tokenizer = load("MXLouis/Llama-Breeze2-8B-Instruct-text-only-mlx-4Bit")
SYSTEM_PROMPT = (
"You are a helpful AI assistant built by MediaTek Research. "
"The user you are helping speaks Traditional Chinese and comes from Taiwan."
)
user_prompt = "請用繁體中文簡短介紹 Swift Package Index。"
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": user_prompt},
]
# If the tokenizer provides a chat template, apply it to build the prompt string.
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
else:
# Fallback: simple concatenation if no chat template is available
prompt = f"System: {SYSTEM_PROMPT}\nUser: {user_prompt}\nAssistant:"
response = generate(model, tokenizer, prompt=prompt, verbose=True)
print(response)