Text Generation
Transformers
Safetensors
GGUF
Chinese
qwen2
code
conversational
text-generation-inference
Instructions to use ystemsrx/Qwen2.5-Interpreter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ystemsrx/Qwen2.5-Interpreter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ystemsrx/Qwen2.5-Interpreter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ystemsrx/Qwen2.5-Interpreter") model = AutoModelForCausalLM.from_pretrained("ystemsrx/Qwen2.5-Interpreter") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use ystemsrx/Qwen2.5-Interpreter with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ystemsrx/Qwen2.5-Interpreter", filename="Qwen2.5-0.5b-interpreter-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use ystemsrx/Qwen2.5-Interpreter with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ystemsrx/Qwen2.5-Interpreter:F16 # Run inference directly in the terminal: llama-cli -hf ystemsrx/Qwen2.5-Interpreter:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ystemsrx/Qwen2.5-Interpreter:F16 # Run inference directly in the terminal: llama-cli -hf ystemsrx/Qwen2.5-Interpreter:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ystemsrx/Qwen2.5-Interpreter:F16 # Run inference directly in the terminal: ./llama-cli -hf ystemsrx/Qwen2.5-Interpreter:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ystemsrx/Qwen2.5-Interpreter:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf ystemsrx/Qwen2.5-Interpreter:F16
Use Docker
docker model run hf.co/ystemsrx/Qwen2.5-Interpreter:F16
- LM Studio
- Jan
- vLLM
How to use ystemsrx/Qwen2.5-Interpreter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ystemsrx/Qwen2.5-Interpreter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ystemsrx/Qwen2.5-Interpreter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ystemsrx/Qwen2.5-Interpreter:F16
- SGLang
How to use ystemsrx/Qwen2.5-Interpreter with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ystemsrx/Qwen2.5-Interpreter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ystemsrx/Qwen2.5-Interpreter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ystemsrx/Qwen2.5-Interpreter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ystemsrx/Qwen2.5-Interpreter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use ystemsrx/Qwen2.5-Interpreter with Ollama:
ollama run hf.co/ystemsrx/Qwen2.5-Interpreter:F16
- Unsloth Studio
How to use ystemsrx/Qwen2.5-Interpreter with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ystemsrx/Qwen2.5-Interpreter to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ystemsrx/Qwen2.5-Interpreter to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ystemsrx/Qwen2.5-Interpreter to start chatting
- Docker Model Runner
How to use ystemsrx/Qwen2.5-Interpreter with Docker Model Runner:
docker model run hf.co/ystemsrx/Qwen2.5-Interpreter:F16
- Lemonade
How to use ystemsrx/Qwen2.5-Interpreter with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ystemsrx/Qwen2.5-Interpreter:F16
Run and chat with the model
lemonade run user.Qwen2.5-Interpreter-F16
List all available models
lemonade list
微调细节
#2
by kxdw2580 - opened
虽然是0.5b模型,但是在程序方面的相关回答即使不用建议的提示词,也可以有条理的规范输出,这种结构化的输出是如何微调出来的?使用的相关数据集是什么?
另外有中文的提示词吗?还是说使用英文的就足够了?
微调使用的是我自己整理的一套数据集,其中内容大致是这样的:
{
"instruction": "打开bing",
"output": "**执行计划**:\n\n1. 在默认浏览器中打开Bing网站(https://www.bing.com)。\n\n**选择编程语言**:\n\n- 选择使用 **Batch 脚本**,因为它适合简单的网页打开操作。\n\n**生成的代码**:\n\n```batch\n@echo off\nstart \"\" \"https://www.bing.com\"\n```",
"system": "**Identity Setting**:\n- You are **Open Interpreter**, running on the user's Windows computer...",
"history": [
[
"代码执行成功",
"Bing搜索引擎已经准备就绪了。让我知道您是否需要其他协助。"
]
]
}
由于模型本身体量较小,所以实际运行效果可能会不佳,仅能完成小任务。提示词没有什么特别要求,我的数据集主要以中文为主,有少量英文。
谢谢回答
kxdw2580 changed discussion status to closed