Text Generation
Transformers
Safetensors
English
Korean
qwen3_5
image-text-to-text
terminal
sft
vllm
tb2-lite
conversational
Instructions to use LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount") model = AutoModelForImageTextToText.from_pretrained("LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount
- SGLang
How to use LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount 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 "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount" \ --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": "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount", "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 "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount" \ --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": "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount with Docker Model Runner:
docker model run hf.co/LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount
Update model card with corrected TB2-lite evaluation
Browse files
README.md
CHANGED
|
@@ -20,69 +20,14 @@ base_model: Qwen/Qwen3.5-2B
|
|
| 20 |
|
| 21 |
- Base model: `Qwen/Qwen3.5-2B`
|
| 22 |
- Training setup: `2 epochs, full fine-tuning, same-count data setting`
|
| 23 |
-
- Evaluation snapshot: `2026-05-
|
| 24 |
- Evaluation result id: `qwen35_2b_sft_samecount_e2`
|
| 25 |
|
| 26 |
-
## ์ฌ์ฉ ๋ฐฉ๋ฒ
|
| 27 |
-
|
| 28 |
-
Transformers ์์:
|
| 29 |
-
|
| 30 |
-
```python
|
| 31 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 32 |
-
import torch
|
| 33 |
-
|
| 34 |
-
model_id = "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount"
|
| 35 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 36 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 37 |
-
model_id,
|
| 38 |
-
torch_dtype=torch.bfloat16,
|
| 39 |
-
device_map="auto",
|
| 40 |
-
trust_remote_code=True,
|
| 41 |
-
)
|
| 42 |
-
|
| 43 |
-
messages = [
|
| 44 |
-
{"role": "system", "content": "You are a terminal automation assistant. Return JSON only."},
|
| 45 |
-
{"role": "user", "content": "List the current directory and identify Python files."},
|
| 46 |
-
]
|
| 47 |
-
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 48 |
-
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 49 |
-
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
|
| 50 |
-
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=False))
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
vLLM ์์:
|
| 54 |
-
|
| 55 |
-
```python
|
| 56 |
-
from vllm import LLM, SamplingParams
|
| 57 |
-
from transformers import AutoTokenizer
|
| 58 |
-
|
| 59 |
-
model_id = "LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount"
|
| 60 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 61 |
-
llm = LLM(model=model_id, dtype="bfloat16", trust_remote_code=True)
|
| 62 |
-
messages = [{"role": "user", "content": "Show disk usage for the current folder."}]
|
| 63 |
-
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 64 |
-
result = llm.generate([prompt], SamplingParams(temperature=0.0, max_tokens=512))
|
| 65 |
-
print(result[0].outputs[0].text)
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
๊ถ์ฅ ์ถ๋ ฅ ํ์:
|
| 69 |
-
|
| 70 |
-
```json
|
| 71 |
-
{
|
| 72 |
-
"analysis": "brief reasoning about the next terminal action",
|
| 73 |
-
"plan": "short execution plan",
|
| 74 |
-
"commands": [
|
| 75 |
-
{"keystrokes": "ls -la\n", "duration": 0.1}
|
| 76 |
-
],
|
| 77 |
-
"task_complete": false
|
| 78 |
-
}
|
| 79 |
-
```
|
| 80 |
-
|
| 81 |
## ํ๊ฐ ๊ฒฐ๊ณผ
|
| 82 |
|
| 83 |
ํ๊ฐ๋ corrected TB2-lite replay set์์ vLLM์ผ๋ก ์ํํ์ต๋๋ค. ์์ ์ ์๋ `100 * avg_command_f1`๋ง ์ฌ์ฉํ๊ณ , `first_cmd_exact_pct`๋ ๋ณด์กฐ ์งํ๋ก๋ง ๋ด
๋๋ค.
|
| 84 |
|
| 85 |
-
- Rank: `1 /
|
| 86 |
- Score: `39.52`
|
| 87 |
- Command F1: `0.3952`
|
| 88 |
- Command precision: `0.5082`
|
|
@@ -90,27 +35,12 @@ print(result[0].outputs[0].text)
|
|
| 90 |
- First command exact: `33.0%`
|
| 91 |
- Valid JSON: `82.2%`
|
| 92 |
- Steps / tasks: `303 / 50`
|
|
|
|
|
|
|
| 93 |
- Template status: `chat_template`
|
| 94 |
- Rank eligible: `True`
|
| 95 |
- Eval timestamp: `2026-05-07T22:06:25.457045`
|
| 96 |
-
- ํ์ฌ ์ง๊ณ๋ ํ๊ฐ ๊ฒฐ๊ณผ ์: `
|
| 97 |
-
|
| 98 |
-
์ฌํ ๋ช
๋ น ์์:
|
| 99 |
-
|
| 100 |
-
```bash
|
| 101 |
-
python tb2_lite/scripts/replay_eval.py \
|
| 102 |
-
--model LLM-OS-Models/Qwen3.5-2B-Terminal-SFT-2Epoch-FullFT-SameCount \
|
| 103 |
-
--model-short qwen35_2b_sft_samecount_e2 \
|
| 104 |
-
--eval-path tb2_lite/data/replay_full.jsonl \
|
| 105 |
-
--output-dir /home/work/.data/tb2_lite_eval/corrected_readme_models_vllm \
|
| 106 |
-
--dtype bfloat16 \
|
| 107 |
-
--max-model-len 49152 \
|
| 108 |
-
--max-tokens 1024 \
|
| 109 |
-
--temperature 0.0 \
|
| 110 |
-
--top-p 1.0 \
|
| 111 |
-
--gpu-memory-utilization 0.94 \
|
| 112 |
-
--language-model-only
|
| 113 |
-
```
|
| 114 |
|
| 115 |
Prompt/template audit:
|
| 116 |
|
|
@@ -129,6 +59,13 @@ Prompt/template audit:
|
|
| 129 |
- ์๋ชป๋ ๋ช
๋ น์ ๋ง์ด ๋ด๊ธฐ๋ณด๋ค ๋ณด์์ ์ผ๋ก ๋ง๋ ๋ช
๋ น์ ๋ด๋ ๊ฒฝํฅ์ด ์์ต๋๋ค.
|
| 130 |
- Qwen ๊ณ์ด์ ์ด๋ฒ ํ๊ฐ์์ ๋ช
๋ น JSON ์์ ์ฑ๊ณผ command F1์ด ์ ๋ฐ์ ์ผ๋ก ๊ฐํ์ต๋๋ค.
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
## ํ๊ณ์ ์ฃผ์์ฌํญ
|
| 133 |
|
| 134 |
- recall์ด ์๋์ ์ผ๋ก ๋ฎ์ ํ์ํ ๋ช
๋ น ์ผ๋ถ๋ฅผ ๋น ๋จ๋ฆด ์ ์์ต๋๋ค.
|
|
|
|
| 20 |
|
| 21 |
- Base model: `Qwen/Qwen3.5-2B`
|
| 22 |
- Training setup: `2 epochs, full fine-tuning, same-count data setting`
|
| 23 |
+
- Evaluation snapshot: `2026-05-08 16:03:10 UTC`
|
| 24 |
- Evaluation result id: `qwen35_2b_sft_samecount_e2`
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## ํ๊ฐ ๊ฒฐ๊ณผ
|
| 27 |
|
| 28 |
ํ๊ฐ๋ corrected TB2-lite replay set์์ vLLM์ผ๋ก ์ํํ์ต๋๋ค. ์์ ์ ์๋ `100 * avg_command_f1`๋ง ์ฌ์ฉํ๊ณ , `first_cmd_exact_pct`๋ ๋ณด์กฐ ์งํ๋ก๋ง ๋ด
๋๋ค.
|
| 29 |
|
| 30 |
+
- Rank: `1 / 56`
|
| 31 |
- Score: `39.52`
|
| 32 |
- Command F1: `0.3952`
|
| 33 |
- Command precision: `0.5082`
|
|
|
|
| 35 |
- First command exact: `33.0%`
|
| 36 |
- Valid JSON: `82.2%`
|
| 37 |
- Steps / tasks: `303 / 50`
|
| 38 |
+
- Sec/step: `0.081`
|
| 39 |
+
- Load time: `97.1s`
|
| 40 |
- Template status: `chat_template`
|
| 41 |
- Rank eligible: `True`
|
| 42 |
- Eval timestamp: `2026-05-07T22:06:25.457045`
|
| 43 |
+
- ํ์ฌ ์ง๊ณ๋ ํ๊ฐ ๊ฒฐ๊ณผ ์: `56`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
Prompt/template audit:
|
| 46 |
|
|
|
|
| 59 |
- ์๋ชป๋ ๋ช
๋ น์ ๋ง์ด ๋ด๊ธฐ๋ณด๋ค ๋ณด์์ ์ผ๋ก ๋ง๋ ๋ช
๋ น์ ๋ด๋ ๊ฒฝํฅ์ด ์์ต๋๋ค.
|
| 60 |
- Qwen ๊ณ์ด์ ์ด๋ฒ ํ๊ฐ์์ ๋ช
๋ น JSON ์์ ์ฑ๊ณผ command F1์ด ์ ๋ฐ์ ์ผ๋ก ๊ฐํ์ต๋๋ค.
|
| 61 |
|
| 62 |
+
## ๋ชจ๋ธ๊ตฐ ํด์
|
| 63 |
+
|
| 64 |
+
- Qwen ๊ณ์ด์ base prior ์์ฒด๊ฐ ๊ฐํ๊ณ , ์ด๋ฒ corrected ํ๊ฐ์์๋ chat template ๊ฒฝ๋ก๊ฐ ์ ์ ์ ์ฉ๋ ์ํ์์ ์ต์์๊ถ ์ ์๋ฅผ ๋์ต๋๋ค.
|
| 65 |
+
- ํ๊ฐ ์ฝ๋๋ ๋ชจ๋ธ๋ช
์ ๋ณด๊ณ ๊ฐ์ฐํ์ง ์์ผ๋ฉฐ `100 * avg_command_f1`๋ง ์์ ์ ์๋ก ์ฌ์ฉํฉ๋๋ค. ๋์ ์ ์๋ Qwen์ ํนํ๋ ์ฝ๋๋ผ๊ธฐ๋ณด๋ค ํฐ๋ฏธ๋ next-action ํฌ๋งท๊ณผ base/SFT ์กฐํฉ์ด ์ ๋ง์ ๊ฒฐ๊ณผ๋ก ํด์ํฉ๋๋ค.
|
| 66 |
+
- ์๋๋ `0.081` sec/step ์์ค์ผ๋ก ๋น ๋ฅธ ํธ์
๋๋ค.
|
| 67 |
+
- RL ํ๋ณด์ฑ: top-tier SFT๋ก reward tuning/GRPO ๋น๊ต์ ๊ธฐ์ค์ ํ๋ณด์
๋๋ค.
|
| 68 |
+
|
| 69 |
## ํ๊ณ์ ์ฃผ์์ฌํญ
|
| 70 |
|
| 71 |
- recall์ด ์๋์ ์ผ๋ก ๋ฎ์ ํ์ํ ๋ช
๋ น ์ผ๋ถ๋ฅผ ๋น ๋จ๋ฆด ์ ์์ต๋๋ค.
|