初始化项目,由ModelHub XC社区提供模型
Model: anime-sh/qwen3-8b-undial-bm25-10b-rebuttal Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||||
89
chat_template.jinja
Normal file
89
chat_template.jinja
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
{%- if tools %}
|
||||||
|
{{- '<|im_start|>system\n' }}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{{- messages[0].content + '\n\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "# 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>" }}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{{- "\n" }}
|
||||||
|
{{- tool | tojson }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- "\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" }}
|
||||||
|
{%- else %}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
||||||
|
{%- for message in messages[::-1] %}
|
||||||
|
{%- set index = (messages|length - 1) - loop.index0 %}
|
||||||
|
{%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
|
||||||
|
{%- set ns.multi_step_tool = false %}
|
||||||
|
{%- set ns.last_query_index = index %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if message.content is string %}
|
||||||
|
{%- set content = message.content %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set content = '' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
||||||
|
{%- elif message.role == "assistant" %}
|
||||||
|
{%- set reasoning_content = '' %}
|
||||||
|
{%- if message.reasoning_content is string %}
|
||||||
|
{%- set reasoning_content = message.reasoning_content %}
|
||||||
|
{%- else %}
|
||||||
|
{%- if '</think>' in content %}
|
||||||
|
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
||||||
|
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if loop.index0 > ns.last_query_index %}
|
||||||
|
{%- if loop.last or (not loop.last and reasoning_content) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if message.tool_calls %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if (loop.first and content) or (not loop.first) %}
|
||||||
|
{{- '\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if tool_call.function %}
|
||||||
|
{%- set tool_call = tool_call.function %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<tool_call>\n{"name": "' }}
|
||||||
|
{{- tool_call.name }}
|
||||||
|
{{- '", "arguments": ' }}
|
||||||
|
{%- if tool_call.arguments is string %}
|
||||||
|
{{- tool_call.arguments }}
|
||||||
|
{%- else %}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '}\n</tool_call>' }}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- elif message.role == "tool" %}
|
||||||
|
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
||||||
|
{{- '<|im_start|>user' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- content }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|im_start|>assistant\n' }}
|
||||||
|
{%- if enable_thinking is defined and enable_thinking is false %}
|
||||||
|
{{- '<think>\n\n</think>\n\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
71
config.json
Normal file
71
config.json
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Qwen3ForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": null,
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"eos_token_id": 151645,
|
||||||
|
"head_dim": 128,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 4096,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 12288,
|
||||||
|
"layer_types": [
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention"
|
||||||
|
],
|
||||||
|
"max_position_embeddings": 40960,
|
||||||
|
"max_window_layers": 36,
|
||||||
|
"model_type": "qwen3",
|
||||||
|
"num_attention_heads": 32,
|
||||||
|
"num_hidden_layers": 36,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"pad_token_id": 151643,
|
||||||
|
"rms_norm_eps": 1e-06,
|
||||||
|
"rope_parameters": {
|
||||||
|
"rope_theta": 1000000,
|
||||||
|
"rope_type": "default"
|
||||||
|
},
|
||||||
|
"sliding_window": null,
|
||||||
|
"tie_word_embeddings": false,
|
||||||
|
"transformers_version": "5.6.0",
|
||||||
|
"use_cache": false,
|
||||||
|
"use_sliding_window": false,
|
||||||
|
"vocab_size": 151936
|
||||||
|
}
|
||||||
35
config.yaml
Normal file
35
config.yaml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
model_name: Qwen/Qwen3-8B
|
||||||
|
forget_path: unlearning-cleanslate/fsid-curated-qwen3-8b:forget:bm25_10B
|
||||||
|
retain_path: unlearning-cleanslate/fsid-curated-qwen3-8b:retain:bm25_10B
|
||||||
|
output_dir: results/rebuttal/train/qwen3-8b-undial-bm25-10b
|
||||||
|
objective: undial
|
||||||
|
num_epochs: 2
|
||||||
|
batch_size: 8
|
||||||
|
gradient_accum_steps: 4
|
||||||
|
lr: 1.0e-05
|
||||||
|
weight_decay: 0.0
|
||||||
|
warmup_steps: 20
|
||||||
|
max_grad_norm: 1.0
|
||||||
|
forget_weight: 1.0
|
||||||
|
retain_weight: 1.0
|
||||||
|
retain_loss_type: nll
|
||||||
|
npo_beta: 0.1
|
||||||
|
simnpo_delta: 0.0
|
||||||
|
rmu_steering_coeff: 2.0
|
||||||
|
rmu_module_regex: model\.layers\.7
|
||||||
|
rmu_control_vec_seed: 0
|
||||||
|
undial_beta: 10.0
|
||||||
|
save_every: 0
|
||||||
|
fsdp_sharding_strategy: full_shard
|
||||||
|
dtype: bfloat16
|
||||||
|
seed: 42
|
||||||
|
num_workers: 0
|
||||||
|
log_every: 10
|
||||||
|
gradient_checkpointing: false
|
||||||
|
torch_compile: false
|
||||||
|
push_to_hub: false
|
||||||
|
hub_repo_id: null
|
||||||
|
hub_private: false
|
||||||
|
optim: adamw_torch
|
||||||
|
_run_name: undial_Qwen3-8B_20260724_014458
|
||||||
|
_run_dir: results/rebuttal/train/qwen3-8b-undial-bm25-10b/undial_Qwen3-8B_20260724_014458
|
||||||
12
generation_config.json
Normal file
12
generation_config.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"do_sample": true,
|
||||||
|
"eos_token_id": [
|
||||||
|
151645,
|
||||||
|
151643
|
||||||
|
],
|
||||||
|
"pad_token_id": 151643,
|
||||||
|
"temperature": 0.6,
|
||||||
|
"top_k": 20,
|
||||||
|
"top_p": 0.95,
|
||||||
|
"transformers_version": "5.6.0"
|
||||||
|
}
|
||||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fa8e3fca8aef3aee88403b0a985ea16c73d1e7a028b926907fdc7cb23f942b61
|
||||||
|
size 16381517208
|
||||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
|
||||||
|
size 11422650
|
||||||
30
tokenizer_config.json
Normal file
30
tokenizer_config.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"add_prefix_space": false,
|
||||||
|
"backend": "tokenizers",
|
||||||
|
"bos_token": null,
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<|im_end|>",
|
||||||
|
"errors": "replace",
|
||||||
|
"extra_special_tokens": [
|
||||||
|
"<|im_start|>",
|
||||||
|
"<|im_end|>",
|
||||||
|
"<|object_ref_start|>",
|
||||||
|
"<|object_ref_end|>",
|
||||||
|
"<|box_start|>",
|
||||||
|
"<|box_end|>",
|
||||||
|
"<|quad_start|>",
|
||||||
|
"<|quad_end|>",
|
||||||
|
"<|vision_start|>",
|
||||||
|
"<|vision_end|>",
|
||||||
|
"<|vision_pad|>",
|
||||||
|
"<|image_pad|>",
|
||||||
|
"<|video_pad|>"
|
||||||
|
],
|
||||||
|
"is_local": false,
|
||||||
|
"local_files_only": false,
|
||||||
|
"model_max_length": 131072,
|
||||||
|
"pad_token": "<|endoftext|>",
|
||||||
|
"split_special_tokens": false,
|
||||||
|
"tokenizer_class": "Qwen2Tokenizer",
|
||||||
|
"unk_token": null
|
||||||
|
}
|
||||||
5
train.log
Normal file
5
train.log
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
2026-07-24 01:45:10,768 INFO cleanslate.fsid.training.trainer: [RANK 0] FSID train: model=Qwen/Qwen3-8B objective=undial run_dir=results/rebuttal/train/qwen3-8b-undial-bm25-10b/undial_Qwen3-8B_20260724_014458
|
||||||
|
2026-07-24 01:45:10,768 INFO cleanslate.fsid.training.trainer: [RANK 0] Creating frozen reference model for undial (dtype=torch.bfloat16)
|
||||||
|
2026-07-24 01:45:15,743 INFO cleanslate.fsid.training.trainer: [RANK 0] Starting training: objective=undial epochs=2
|
||||||
|
2026-07-24 01:57:08,892 INFO cleanslate.fsid.training.trainer: [RANK 0] Saved checkpoint to results/rebuttal/train/qwen3-8b-undial-bm25-10b/undial_Qwen3-8B_20260724_014458
|
||||||
|
2026-07-24 01:57:08,895 INFO cleanslate.fsid.training.trainer: [RANK 0] Training complete (673.5s)
|
||||||
48
train_summary.json
Normal file
48
train_summary.json
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"run_name": "undial_Qwen3-8B_20260724_014458",
|
||||||
|
"run_dir": "results/rebuttal/train/qwen3-8b-undial-bm25-10b/undial_Qwen3-8B_20260724_014458",
|
||||||
|
"config": {
|
||||||
|
"model_name": "Qwen/Qwen3-8B",
|
||||||
|
"forget_path": "unlearning-cleanslate/fsid-curated-qwen3-8b:forget:bm25_10B",
|
||||||
|
"retain_path": "unlearning-cleanslate/fsid-curated-qwen3-8b:retain:bm25_10B",
|
||||||
|
"output_dir": "results/rebuttal/train/qwen3-8b-undial-bm25-10b",
|
||||||
|
"objective": "undial",
|
||||||
|
"num_epochs": 2,
|
||||||
|
"batch_size": 8,
|
||||||
|
"gradient_accum_steps": 4,
|
||||||
|
"lr": 1e-05,
|
||||||
|
"weight_decay": 0.0,
|
||||||
|
"warmup_steps": 20,
|
||||||
|
"max_grad_norm": 1.0,
|
||||||
|
"forget_weight": 1.0,
|
||||||
|
"retain_weight": 1.0,
|
||||||
|
"retain_loss_type": "nll",
|
||||||
|
"npo_beta": 0.1,
|
||||||
|
"simnpo_delta": 0.0,
|
||||||
|
"rmu_steering_coeff": 2.0,
|
||||||
|
"rmu_module_regex": "model\\.layers\\.7",
|
||||||
|
"rmu_control_vec_seed": 0,
|
||||||
|
"undial_beta": 10.0,
|
||||||
|
"save_every": 0,
|
||||||
|
"fsdp_sharding_strategy": "full_shard",
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"seed": 42,
|
||||||
|
"num_workers": 0,
|
||||||
|
"log_every": 10,
|
||||||
|
"gradient_checkpointing": false,
|
||||||
|
"torch_compile": false,
|
||||||
|
"push_to_hub": false,
|
||||||
|
"hub_repo_id": null,
|
||||||
|
"hub_private": false,
|
||||||
|
"optim": "adamw_torch"
|
||||||
|
},
|
||||||
|
"num_forget_rows": 6326,
|
||||||
|
"num_forget_pairs": 6326,
|
||||||
|
"num_retain_rows": 1646,
|
||||||
|
"num_retain_sequences": 1646,
|
||||||
|
"num_trainable_params": 8190735360,
|
||||||
|
"num_total_params": 8190735360,
|
||||||
|
"run_seconds": 673.4785075187683,
|
||||||
|
"checkpoint_dir": "results/rebuttal/train/qwen3-8b-undial-bm25-10b/undial_Qwen3-8B_20260724_014458",
|
||||||
|
"is_main_process": true
|
||||||
|
}
|
||||||
3
training_args.bin
Normal file
3
training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cef53b77cd5366cc56c6e0bfaa17d40a1439a2cbb680913bccd24de980a351f7
|
||||||
|
size 5329
|
||||||
Reference in New Issue
Block a user