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 new
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
Improve language tag
#3
by lbourdois - opened
README.md
CHANGED
|
@@ -1,147 +1,159 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
#
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
-
|
| 33 |
-
|
| 34 |
-
**
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
- **
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
**
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
**
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
**
|
| 58 |
-
- **
|
| 59 |
-
- **
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
```
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
--
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
Model Fine-tuning Python Batch Windows Automation System Scripting Security Efficiency Multi-step Operations
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- zho
|
| 5 |
+
- eng
|
| 6 |
+
- fra
|
| 7 |
+
- spa
|
| 8 |
+
- por
|
| 9 |
+
- deu
|
| 10 |
+
- ita
|
| 11 |
+
- rus
|
| 12 |
+
- jpn
|
| 13 |
+
- kor
|
| 14 |
+
- vie
|
| 15 |
+
- tha
|
| 16 |
+
- ara
|
| 17 |
+
base_model:
|
| 18 |
+
- Qwen/Qwen2.5-0.5B-Instruct
|
| 19 |
+
tags:
|
| 20 |
+
- code
|
| 21 |
+
library_name: transformers
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
[中文](README.zh.md)
|
| 25 |
+
|
| 26 |
+
# Qwen2.5-Interpreter
|
| 27 |
+
|
| 28 |
+
## Model Overview
|
| 29 |
+
|
| 30 |
+
**Qwen2.5-Interpreter** is a fine-tuned version of the Qwen2.5-0.5B model, designed to perform system operations on Windows platforms by generating Python or Batch scripts. This model specializes in processing user requests for automation tasks, ensuring precision, security, and efficiency.
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
**You can integrate this model with the [Code-Atlas project](https://github.com/ystemsrx/Code-Atlas) for seamless utilization and enhanced functionality.**
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## Intended Use
|
| 39 |
+
|
| 40 |
+
This model is tailored for automation tasks requiring the generation and execution of Python or Batch scripts. It performs best when used with the following **system prompt**:
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
**Identity Setup**:
|
| 44 |
+
- You are **Open Interpreter**, operating on the user's Windows computer.
|
| 45 |
+
|
| 46 |
+
**Execution Capability**:
|
| 47 |
+
- Complete tasks using **Batch scripts** or **Python code**.
|
| 48 |
+
|
| 49 |
+
**Operation Process**:
|
| 50 |
+
1. **Receive Request**: The user submits an operation request.
|
| 51 |
+
2. **Develop Plan**: Plan the steps and required resources.
|
| 52 |
+
3. **Choose Language**: Select Batch or Python.
|
| 53 |
+
4. **Generate and Output Code**: Provide executable code to the user.
|
| 54 |
+
5. **Receive Execution Results**: Obtain the results of the executed code sent by the user.
|
| 55 |
+
6. **Ensure Single Execution**: Accurately discern execution results to prevent repeated executions of the same code.
|
| 56 |
+
|
| 57 |
+
**Code Requirements**:
|
| 58 |
+
- **No User Interaction**: No user input required.
|
| 59 |
+
- **Path Handling**: Use the current directory by default, ensure paths are valid and secure.
|
| 60 |
+
- **Execution Result Handling**: Obtain, parse, and succinctly feedback the results.
|
| 61 |
+
|
| 62 |
+
**Multi-step Tasks**:
|
| 63 |
+
- Execute complete code snippets step-by-step, maintaining solution consistency. For the same problem, only one solution can be used.
|
| 64 |
+
|
| 65 |
+
**Security and Efficiency**:
|
| 66 |
+
- Code is safe and harmless, follows best programming practices, ensuring efficiency and maintainability.
|
| 67 |
+
- Must avoid hallucinations.
|
| 68 |
+
|
| 69 |
+
**Additional Instructions**:
|
| 70 |
+
- **Result Submission**: After executing the code, the user will send the execution results back to you.
|
| 71 |
+
- **Avoid Redundancy**: Ensure that each code snippet is executed only once by accurately tracking and recognizing previously executed tasks.
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
By utilizing this prompt, the model can fully leverage its fine-tuned capabilities to deliver optimal results.
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## Example Usage
|
| 79 |
+
|
| 80 |
+
### Example 1: Create a new folder
|
| 81 |
+
|
| 82 |
+
```
|
| 83 |
+
> Create a new folder
|
| 84 |
+
|
| 85 |
+
# 执行计划:
|
| 86 |
+
1. 我会在当前目录创建一个名为 "NewFolder" 的文件夹。
|
| 87 |
+
|
| 88 |
+
**选择编程语言:**
|
| 89 |
+
|
| 90 |
+
- 选择使用 Batch 脚本,因为它适合简单的文件和目录操作。
|
| 91 |
+
|
| 92 |
+
**生成的代码:**
|
| 93 |
+
|
| 94 |
+
```batch
|
| 95 |
+
@echo off
|
| 96 |
+
set "foldername=NewFolder"
|
| 97 |
+
mkdir "%cd%\%foldername%"
|
| 98 |
+
\```
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
### Example 2: Tell me what's in `story.txt`
|
| 104 |
+
|
| 105 |
+
```
|
| 106 |
+
> Tell me what's in story.txt
|
| 107 |
+
|
| 108 |
+
# 执行计划:
|
| 109 |
+
1. 打开文件并读取文件内容。
|
| 110 |
+
|
| 111 |
+
**选择编程语言:**
|
| 112 |
+
- 选择使用 Python,因为它有文件读取的功能。
|
| 113 |
+
|
| 114 |
+
**生成的代码:**
|
| 115 |
+
|
| 116 |
+
```python
|
| 117 |
+
# 打开文件并读取文件内容
|
| 118 |
+
with open('story.txt', 'r', encoding='utf-8') as file:
|
| 119 |
+
content = file.read()
|
| 120 |
+
|
| 121 |
+
print(f'文件content:{content}')
|
| 122 |
+
\```
|
| 123 |
+
|
| 124 |
+
> 代码执行成功: 文件content:This story is about me and my family.
|
| 125 |
+
|
| 126 |
+
文件content:This story is about me and my family.
|
| 127 |
+
|
| 128 |
+
请问还有什么可以帮助您的吗?
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
---
|
| 132 |
+
|
| 133 |
+
## Training Data
|
| 134 |
+
|
| 135 |
+
The model was fine-tuned on a curated dataset focusing on:
|
| 136 |
+
- Windows-specific automation and scripting scenarios.
|
| 137 |
+
- Practical examples of Python and Batch operations.
|
| 138 |
+
- Security-compliant programming practices.
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
## Limitations
|
| 143 |
+
|
| 144 |
+
- **Platform Specificity**: Optimized for Windows; performance may vary on other operating systems.
|
| 145 |
+
- **No Interactive Code**: Cannot generate scripts requiring real-time user interaction.
|
| 146 |
+
- **Complex Custom Scripts**: For highly intricate tasks, external review might be needed.
|
| 147 |
+
|
| 148 |
+
---
|
| 149 |
+
|
| 150 |
+
## Ethical Considerations
|
| 151 |
+
|
| 152 |
+
- **Safety Assurance**: Ensures generated code is non-malicious and adheres to security standards.
|
| 153 |
+
- **Privacy Respect**: Avoids creating scripts that could compromise user data without clear intent.
|
| 154 |
+
|
| 155 |
+
---
|
| 156 |
+
|
| 157 |
+
## Relevant Topics
|
| 158 |
+
|
| 159 |
Model Fine-tuning Python Batch Windows Automation System Scripting Security Efficiency Multi-step Operations
|