Views
No views yet
1from mlx_lm import load, generate
2
3model, tokenizer = load("minimax-reap50-mlx-4bit")
4
5response = generate(
6 model,
7 tokenizer,
8 prompt="Write a function to calculate fibonacci numbers",
9 max_tokens=500,
10 verbose=True
11)
12print(response)mlx_lm.server --model minimax-reap50-mlx-4bit --port 80801curl -X POST http://localhost:8080/v1/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "default_model",
5 "prompt": "Write a function to calculate fibonacci numbers",
6 "max_tokens": 500
7 }'1curl -X POST http://localhost:8080/v1/chat/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "default_model",
5 "messages": [
6 {"role": "user", "content": "Write a function to calculate fibonacci numbers"}
7 ],
8 "max_tokens": 500
9 }'