OneFly7 commited on
Commit
bb28f37
·
verified ·
1 Parent(s): 88fc866

Upload CNN/DM Qwen3-Reranker-0.6B pointwise MSE sentence scorer

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
chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# 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>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\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" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 151645,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 1024,
13
+ "id2label": {
14
+ "0": "LABEL_0"
15
+ },
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "LABEL_0": 0
20
+ },
21
+ "layer_types": [
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
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention",
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention",
49
+ "full_attention"
50
+ ],
51
+ "max_position_embeddings": 40960,
52
+ "max_window_layers": 28,
53
+ "model_type": "qwen3",
54
+ "num_attention_heads": 16,
55
+ "num_hidden_layers": 28,
56
+ "num_key_value_heads": 8,
57
+ "pad_token_id": 151643,
58
+ "problem_type": "regression",
59
+ "rms_norm_eps": 1e-06,
60
+ "rope_parameters": {
61
+ "rope_theta": 1000000,
62
+ "rope_type": "default"
63
+ },
64
+ "salience_document_payload_format": "Document:\\n[indexed source sentences]\\n\\nCandidate sentence:\\n[Sxxx] sentence",
65
+ "salience_instruction": "Given an indexed document and a designated candidate sentence, judge whether the candidate sentence contains information that is important for representing the document as a whole.",
66
+ "salience_loss_type": "mse",
67
+ "salience_query": "Is the designated candidate sentence salient to the document as a whole?",
68
+ "salience_reranker_bias": 0.49982699751853943,
69
+ "salience_reranker_false_token_id": 2152,
70
+ "salience_reranker_scale": 0.09945447742938995,
71
+ "salience_reranker_true_token_id": 9693,
72
+ "salience_score_aggregation": "scalar",
73
+ "salience_score_semantics": "model_balanced_salience_probability",
74
+ "salience_score_transform": "affine_yes_no_logit_difference",
75
+ "sliding_window": null,
76
+ "tie_word_embeddings": true,
77
+ "transformers_version": "5.6.2",
78
+ "use_cache": true,
79
+ "use_sliding_window": false,
80
+ "vocab_size": 151669
81
+ }
eval_metrics.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eval_loss": 0.025318242609500885,
3
+ "eval_mse": 0.025318242609500885,
4
+ "eval_rmse": 0.1591170720240317,
5
+ "eval_mae": 0.11795498430728912,
6
+ "eval_pearson": 0.8350127545867635,
7
+ "eval_spearman": 0.8358440526327534,
8
+ "eval_article_spearman": 0.7503282767323686,
9
+ "eval_article_ndcg_at_3": 0.9025520167592553,
10
+ "eval_article_ndcg_at_5": 0.9049475539825387,
11
+ "eval_runtime": 128.5009,
12
+ "eval_samples_per_second": 52.863,
13
+ "eval_steps_per_second": 26.436,
14
+ "epoch": 2.8970709052193886
15
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "temperature": 0.6,
10
+ "top_k": 20,
11
+ "top_p": 0.95,
12
+ "transformers_version": "5.6.2"
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a6b7723ec60fd3dabd8c8f085a0673fcc692005dcda229c4d9db9f9c787343f
3
+ size 1191588280
qwen3_reranker_sentence_scorer_config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": 1,
3
+ "model_name": "Qwen/Qwen3-Reranker-0.6B",
4
+ "resolved_model_name": "/lustre/fsmisc/dataset/HuggingFace_Models/Qwen/Qwen3-Reranker-0.6B",
5
+ "training_objective": "identity_mse",
6
+ "target_field": "salience_score_model_balanced",
7
+ "native_score": "yes_logit_minus_no_logit",
8
+ "scale": 0.09945447742938995,
9
+ "bias": 0.49982699751853943,
10
+ "initial_scale": 0.1,
11
+ "initial_bias": 0.5,
12
+ "instruction": "Given an indexed document and a designated candidate sentence, judge whether the candidate sentence contains information that is important for representing the document as a whole.",
13
+ "query": "Is the designated candidate sentence salient to the document as a whole?",
14
+ "text_field": "model_input_text",
15
+ "max_length": 4608,
16
+ "attn_implementation": "sdpa",
17
+ "pairwise": false,
18
+ "article_balanced": false,
19
+ "multihead": false
20
+ }
run_summary.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CNN/DailyMail Qwen3-Reranker Pointwise MSE Run
2
+
3
+ - model_name: `Qwen/Qwen3-Reranker-0.6B`
4
+ - resolved_model_name: `/lustre/fsmisc/dataset/HuggingFace_Models/Qwen/Qwen3-Reranker-0.6B`
5
+ - target_mode: `model_balanced`
6
+ - target_field: `salience_score_model_balanced`
7
+ - loss_type: `mse`
8
+ - score_transform: `identity_after_affine_yes_no_logit_difference`
9
+ - pairwise: `False`
10
+ - article_balanced: `False`
11
+ - multihead: `False`
12
+ - instruction: `Given an indexed document and a designated candidate sentence, judge whether the candidate sentence contains information that is important for representing the document as a whole.`
13
+ - query: `Is the designated candidate sentence salient to the document as a whole?`
14
+ - initial_scale: `0.1`
15
+ - initial_bias: `0.5`
16
+ - trained_scale: `0.09945447742938995`
17
+ - trained_bias: `0.49982699751853943`
18
+ - train_file: `data/CNN_DM/representative_subset/salience_generation/recovery_f2_all6/sentence_scorer_data/modernbert_pointwise/train.jsonl`
19
+ - dev_file: `data/CNN_DM/representative_subset/salience_generation/recovery_f2_all6/sentence_scorer_data/modernbert_pointwise/dev.jsonl`
20
+ - train_rows: `59643`
21
+ - dev_rows: `6793`
22
+ - train_articles: `1000`
23
+ - dev_articles: `200`
24
+ - max_length: `4608`
25
+ - attn_implementation: `sdpa`
26
+ - learning_rate: `1e-05`
27
+ - weight_decay: `0.01`
28
+ - num_train_epochs: `3.0`
29
+ - warmup_ratio: `0.06`
30
+ - per_device_train_batch_size: `1`
31
+ - per_device_eval_batch_size: `2`
32
+ - gradient_accumulation_steps: `16`
33
+ - effective_train_batch_size: `16`
34
+ - bf16: `True`
35
+ - fp16: `False`
36
+ - gradient_checkpointing: `True`
37
+
38
+ ## Eval Metrics
39
+
40
+ - epoch: `2.8970709052193886`
41
+ - eval_article_ndcg_at_3: `0.9025520167592553`
42
+ - eval_article_ndcg_at_5: `0.9049475539825387`
43
+ - eval_article_spearman: `0.7503282767323686`
44
+ - eval_loss: `0.025318242609500885`
45
+ - eval_mae: `0.11795498430728912`
46
+ - eval_mse: `0.025318242609500885`
47
+ - eval_pearson: `0.8350127545867635`
48
+ - eval_rmse: `0.1591170720240317`
49
+ - eval_runtime: `128.5009`
50
+ - eval_samples_per_second: `52.863`
51
+ - eval_spearman: `0.8358440526327534`
52
+ - eval_steps_per_second: `26.436`
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99ed0d3e22f11b44ffee65619d1099fb6fc9e16df506ceec57ae458f5c36e1e2
3
+ size 11422749
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "is_local": true,
9
+ "local_files_only": true,
10
+ "model_max_length": 131072,
11
+ "pad_token": "<|endoftext|>",
12
+ "padding_side": "left",
13
+ "split_special_tokens": false,
14
+ "tokenizer_class": "Qwen2Tokenizer",
15
+ "unk_token": null
16
+ }