MubarakB commited on
Commit
d8d33ca
·
verified ·
1 Parent(s): 46b80a4

poc-1: LoRA fine tune of Qwen/Qwen2.5-Coder-1.5B-Instruct

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ Copyright (c) 2026 the submitter. All rights reserved.
2
+
3
+ This model is licensed to Microtensor under the Microtensor submission terms
4
+ (https://www.microtensor.cloud/terms) for evaluation, archiving and serving on the
5
+ Microtensor network. It is not published under a free licence. No other use,
6
+ redistribution or sublicensing is permitted without written permission.
README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: microtensor-submission
4
+ license_link: https://www.microtensor.cloud/terms
5
+ base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
6
+ tags:
7
+ - microtensor
8
+ - ctx_compress
9
+ ---
10
+
11
+ # mt_slm_ctx_compress
12
+
13
+ A specialised compaction model for the Microtensor `ctx_compress` arena.
14
+
15
+ | Field | Value |
16
+ |---|---|
17
+ | Base model | Qwen/Qwen2.5-Coder-1.5B-Instruct |
18
+ | Method | LoRA (r=16) on label derived targets, merged into the base weights |
19
+ | Arena | ctx_compress |
20
+ | Run | poc-1 |
21
+
22
+ The root of this repository loads with `AutoModelForCausalLM`. Everything under `training/` is the record validators require and the archive keeps; it is never scored.
chat_template.jinja ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
38
+ {%- endfor %}
39
+ {{- '<|im_end|>\n' }}
40
+ {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
+ {{- '<|im_start|>user' }}
43
+ {%- endif %}
44
+ {{- '\n<tool_response>\n' }}
45
+ {{- message.content }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "dtype": "float16",
8
+ "eos_token_id": 151645,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 1536,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 8960,
13
+ "layer_types": [
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention"
42
+ ],
43
+ "max_position_embeddings": 32768,
44
+ "max_window_layers": 28,
45
+ "model_type": "qwen2",
46
+ "num_attention_heads": 12,
47
+ "num_hidden_layers": 28,
48
+ "num_key_value_heads": 2,
49
+ "pad_token_id": null,
50
+ "rms_norm_eps": 1e-06,
51
+ "rope_parameters": {
52
+ "rope_theta": 1000000.0,
53
+ "rope_type": "default"
54
+ },
55
+ "sliding_window": null,
56
+ "tie_word_embeddings": true,
57
+ "transformers_version": "5.16.1",
58
+ "use_cache": true,
59
+ "use_sliding_window": false,
60
+ "vocab_size": 151936
61
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "repetition_penalty": 1.1,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "5.16.1"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e882ac47481918e1fa2efdb43998c5ada1a39d5e00b383eb42d70995c4df0e56
3
+ size 3087466808
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
3
+ size 11421892
tokenizer_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "local_files_only": false,
25
+ "model_max_length": 32768,
26
+ "pad_token": "<|endoftext|>",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null
30
+ }
training/compression/before_after.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "before": {
3
+ "items": 16,
4
+ "valid_json": 1.0,
5
+ "within_budget": 1.0,
6
+ "recall": 0.546,
7
+ "invented": 0.058,
8
+ "score_if_continuation_1": 0.735,
9
+ "score_if_continuation_0": 0.264,
10
+ "note": "continuation needs the 7B probe agent and is not measured here; validators measure it"
11
+ },
12
+ "after": {
13
+ "items": 16,
14
+ "valid_json": 1.0,
15
+ "within_budget": 1.0,
16
+ "recall": 0.546,
17
+ "invented": 0.058,
18
+ "score_if_continuation_1": 0.735,
19
+ "score_if_continuation_0": 0.264,
20
+ "note": "continuation needs the 7B probe agent and is not measured here; validators measure it"
21
+ }
22
+ }
training/compression/compression.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "method": "none",
3
+ "bits": 16,
4
+ "calibration_data_sha256": ""
5
+ }
training/data/data_card.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Data card
2
+
3
+ Dev items built with `mta dev --arena ctx_compress --count 200 --seed 7` from nebius/SWE-agent-trajectories (CC BY 4.0, trajectories written by Llama 3.1 70B). 148 examples were used for training; repositories in the held out slice were never trained on. Each target is the item's label (key facts and probe answers) rendered into the arena's five field JSON.
training/data/sources.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "nebius/SWE-agent-trajectories",
4
+ "version": "main",
5
+ "license": "CC-BY-4.0",
6
+ "sha256": ""
7
+ },
8
+ {
9
+ "name": "label-derived-targets",
10
+ "version": "poc-1",
11
+ "license": "proprietary",
12
+ "sha256": ""
13
+ }
14
+ ]
training/data/synthetic.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "generator": "make_target from dev labels",
3
+ "examples": 148
4
+ }
training/distillation/teacher.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "teacher_model": "none",
3
+ "teacher_version": "",
4
+ "harness_used": "none"
5
+ }
training/recipe.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_model": "Qwen/Qwen2.5-Coder-1.5B-Instruct",
3
+ "method": "lora-sft",
4
+ "harness_aware": false,
5
+ "targets": "derived from dev item labels: facts and probe answers rendered into the five field JSON",
6
+ "hyperparameters": {
7
+ "epochs": 1,
8
+ "learning_rate": 0.0002,
9
+ "batch_size": 4,
10
+ "max_length": 12288,
11
+ "lora_r": 16,
12
+ "lora_alpha": 32
13
+ },
14
+ "seeds": [
15
+ 7
16
+ ],
17
+ "compression": "none"
18
+ }
training/runs/poc-1/config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run_id": "poc-1",
3
+ "base_model": "Qwen/Qwen2.5-Coder-1.5B-Instruct",
4
+ "epochs": 1,
5
+ "learning_rate": 0.0002,
6
+ "lora_r": 16,
7
+ "max_length": 12288,
8
+ "examples": 148
9
+ }
training/runs/poc-1/env.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "libraries": {
3
+ "torch": "2.11.0+cu128",
4
+ "transformers": "5.16.1",
5
+ "peft": "0.20.0"
6
+ },
7
+ "gpu": "Tesla T4 (15.6 GB), Tesla T4 (15.6 GB)",
8
+ "gpus": 2,
9
+ "hours": 0.438
10
+ }
training/runs/poc-1/final_eval.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "items": 16,
3
+ "valid_json": 1.0,
4
+ "within_budget": 1.0,
5
+ "recall": 0.546,
6
+ "invented": 0.058,
7
+ "score_if_continuation_1": 0.735,
8
+ "score_if_continuation_0": 0.264,
9
+ "note": "continuation needs the 7B probe agent and is not measured here; validators measure it"
10
+ }
training/runs/poc-1/metrics.jsonl ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {"step": 5, "loss": 4.628752136230469, "learning_rate": 0.00019839295885986296}
2
+ {"step": 10, "loss": 1.7857921600341797, "learning_rate": 0.00018090169943749476}
3
+ {"step": 15, "loss": 0.9388137817382812, "learning_rate": 0.00014738686624729986}
4
+ {"step": 20, "loss": 0.7277382373809814, "learning_rate": 0.00010448648303505151}
5
+ {"step": 25, "loss": 0.6034830570220947, "learning_rate": 6.069749683460765e-05}
6
+ {"step": 30, "loss": 0.45470294952392576, "learning_rate": 2.4692853399638917e-05}
7
+ {"step": 35, "loss": 0.46642556190490725, "learning_rate": 3.6037139304146762e-06}