Instructions to use mlx-community/Yi-34B-Chat-hf-4bit-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Yi-34B-Chat-hf-4bit-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/Yi-34B-Chat-hf-4bit-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use mlx-community/Yi-34B-Chat-hf-4bit-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/Yi-34B-Chat-hf-4bit-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Yi-34B-Chat-hf-4bit-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Yi-34B-Chat-hf-4bit-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
update license in readme.md
#1
by Chen-01AI - opened
Hi, I'm Chen, a DevRel specialist from 01.AI.
Today I'm sending you the PR to help you update the model license, and give a recommendation according to apache-2.0.
- License Update:
Since license of all Yi Series models has been updated from yi-license to apache-2.0, this PR is to help you update it.
License under apache-2.0 enables more free and flexible use and distribution, promoting open collaboration and innovation. It can be a good choice to make your models widely available and provide access which is reliable and high-quality. (https://www.apache.org/licenses/LICENSE-2.0)
If it looks good to you, you can choose to update other yi derivatives (if you have) license to apache-2.0 on your own if I miss out. - Recommendation for Yi Derivatives:
All Yi Series models are now licensed under apache-2.0. It is recomended that Yi derivatives mention the specific Yi models they're based on in any place (e.g., in the Model Card) to align with the requirement of apache-2.0.
Thanks for your continued support and contributions to Yi models.
mzbac changed pull request status to merged