danielcfho's picture
Add files using upload-large-folder tool
fc8381b verified
metadata
license: apache-2.0
language:
  - en
pipeline_tag: text-generation
tags:
  - chat
  - mlx
  - mlx
base_model: danielcfho/qwen2-0.5b-instruct-mlx

danielcfho/qwen2-0.5b-instruct-mlx-q4

The Model danielcfho/qwen2-0.5b-instruct-mlx-q4 was converted to MLX format from danielcfho/qwen2-0.5b-instruct-mlx using mlx-lm version 0.21.1.

Use with mlx

pip install mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("danielcfho/qwen2-0.5b-instruct-mlx-q4")

prompt = "hello"

if tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)