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