Merge branch 'ml-explore:main' into adding-orpo-training

This commit is contained in:
Gökdeniz Gülmez
2025-01-22 14:18:38 +01:00
committed by GitHub
3 changed files with 15 additions and 7 deletions

View File

@@ -22,6 +22,11 @@ import mlx.core as mx
from mlx_lm import load, stream_generate
parser = argparse.ArgumentParser(description="LLM pipelined inference example")
parser.add_argument(
"--model",
default="mlx-community/DeepSeek-R1-3bit",
help="HF repo or path to local model.",
)
parser.add_argument(
"--prompt",
"-p",
@@ -37,9 +42,7 @@ parser.add_argument(
)
args = parser.parse_args()
model_repo = "mlx-community/DeepSeek-V3-3bit"
model, tokenizer = load(model_repo, lazy=True)
model, tokenizer = load(args.model, lazy=True)
messages = [{"role": "user", "content": args.prompt}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)