akaruineko commited on
Commit
cb59dea
·
verified ·
1 Parent(s): e331dfb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -19
README.md CHANGED
@@ -3,12 +3,14 @@ license: openmdw-1.1
3
  library_name: transformers
4
  pipeline_tag: text-generation
5
  tags:
6
- - qwen3.5
7
- - text-generation
8
- - agent-memory
9
- - trace-summarization
10
- - text-only
11
- - lora
 
 
12
  ---
13
 
14
  # compctx-0.8b
@@ -66,35 +68,51 @@ model = AutoModelForCausalLM.from_pretrained(
66
  )
67
 
68
  trace = """
69
- [user] Fix the error in script.py.
70
- [assistant] Reading the file.
71
- [tool_call] view_file(path="script.py")
72
- [tool_result] print('Hello' + 5)
73
- [assistant] Fixing the expression.
74
- [tool_call] edit_file(path="script.py")
75
- [tool_result] OK
 
 
 
 
 
 
 
 
 
 
 
76
  """
77
 
78
  messages = [
79
  {"role": "user", "content": trace},
80
  ]
81
 
82
- inputs = tokenizer.apply_chat_template(
83
  messages,
84
- tokenize=True,
85
  add_generation_prompt=True,
 
 
 
 
86
  return_tensors="pt",
 
87
  ).to(model.device)
88
 
89
  with torch.inference_mode():
90
  output = model.generate(
91
- inputs,
92
  max_new_tokens=512,
93
  do_sample=False,
94
  )
95
 
96
  result = tokenizer.decode(
97
- output[0][inputs.shape[1]:],
98
  skip_special_tokens=True,
99
  )
100
 
@@ -122,7 +140,6 @@ The chat template automatically:
122
  ## Limitations
123
 
124
  - Not a general-purpose conversational assistant.
125
- - Accepts text traces only; images and video are not supported.
126
  - Designed around the specific structured output format above.
127
  - Accuracy depends on the information available in the input trace.
128
  - May omit details when the input exceeds its context or output budget.
@@ -137,4 +154,4 @@ The resulting adapter was merged into a standalone text-only checkpoint.
137
 
138
  ## License
139
 
140
- This model is based on Qwen3.5-0.8B. Check the base model's license and applicable terms before redistribution or commercial use. The license for this model is OpenMDW-1.1
 
3
  library_name: transformers
4
  pipeline_tag: text-generation
5
  tags:
6
+ - qwen3.5
7
+ - text-generation
8
+ - agent-memory
9
+ - trace-summarization
10
+ - text-only
11
+ - lora
12
+ base_model:
13
+ - Qwen/Qwen3.5-0.8B
14
  ---
15
 
16
  # compctx-0.8b
 
68
  )
69
 
70
  trace = """
71
+ [TRACE] [2026-10-30 06:24:00] [AGENT: Orchestrator]
72
+ User Prompt: "Find the errors in the file script.py and fix them."
73
+
74
+ [SPAN] [Thinking Process]
75
+ "To solve the task, I first need to read the contents of the file script.py. I will use the view_file tool."
76
+
77
+ [SPAN] [Tool Call: view_file]
78
+ Arguments: {"path": "script.py"}
79
+ Response: "def main():\n print('Hello' + 5)"
80
+
81
+ [SPAN] [Thinking Process]
82
+ "There is a TypeError in the code: you cannot add a string and a number together. You need to replace 5 with '5' or use an f-string. I am invoking the patch_file tool."
83
+
84
+ [SPAN] [Tool Call: patch_file]
85
+ Arguments: {"path": "script.py", "edit": "print(f'Hello {5}')"}
86
+ Response: "File patched successfully."
87
+
88
+ [TRACE END] Agent completed the task.
89
  """
90
 
91
  messages = [
92
  {"role": "user", "content": trace},
93
  ]
94
 
95
+ prompt = tokenizer.apply_chat_template(
96
  messages,
97
+ tokenize=False,
98
  add_generation_prompt=True,
99
+ )
100
+
101
+ inputs = tokenizer(
102
+ prompt,
103
  return_tensors="pt",
104
+ add_special_tokens=False,
105
  ).to(model.device)
106
 
107
  with torch.inference_mode():
108
  output = model.generate(
109
+ **inputs,
110
  max_new_tokens=512,
111
  do_sample=False,
112
  )
113
 
114
  result = tokenizer.decode(
115
+ output[0][inputs["input_ids"].shape[1]:],
116
  skip_special_tokens=True,
117
  )
118
 
 
140
  ## Limitations
141
 
142
  - Not a general-purpose conversational assistant.
 
143
  - Designed around the specific structured output format above.
144
  - Accuracy depends on the information available in the input trace.
145
  - May omit details when the input exceeds its context or output budget.
 
154
 
155
  ## License
156
 
157
+ This model is based on Qwen3.5-0.8B. Check the base model's license and applicable terms before redistribution or commercial use. The license for this model is OpenMDW-1.1