初始化项目,由ModelHub XC社区提供模型

Model: MatanBT/mia-target-model
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-04 00:31:20 +08:00
commit 9eaeb62a2f
24 changed files with 103112 additions and 0 deletions

43
.gitattributes vendored Normal file
View File

@@ -0,0 +1,43 @@
*.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
checkpoint-500/tokenizer.json filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-25/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-75/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-125/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-65/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-250/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-300/tokenizer.json filter=lfs diff=lfs merge=lfs -text

16
README.md Normal file
View File

@@ -0,0 +1,16 @@
---
library_name: transformers
base_model: google/gemma-3-1b-pt
---
# ML Security Seminar - Target Model
Fine-tuned language model for Week 7 membership inference exercise.
See course materials for instructions.
Load the model using the following code:
```python
tokenizer = AutoTokenizer.from_pretrained("matanbt/mia-target-model")
model = AutoModelForCausalLM.from_pretrained("matanbt/mia-target-model")
```

3
added_tokens.json Normal file
View File

@@ -0,0 +1,3 @@
{
"<image_soft_token>": 262144
}

View File

@@ -0,0 +1,3 @@
{
"<image_soft_token>": 262144
}

View File

@@ -0,0 +1,64 @@
{
"_sliding_window_pattern": 6,
"architectures": [
"Gemma3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": null,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"dtype": "bfloat16",
"eos_token_id": 1,
"final_logit_softcapping": null,
"head_dim": 256,
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 1152,
"initializer_range": 0.02,
"intermediate_size": 6912,
"layer_types": [
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention"
],
"max_position_embeddings": 32768,
"model_type": "gemma3_text",
"num_attention_heads": 4,
"num_hidden_layers": 26,
"num_key_value_heads": 1,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_local_base_freq": 10000,
"rope_scaling": null,
"rope_theta": 1000000,
"sliding_window": 512,
"sliding_window_pattern": 6,
"transformers_version": "4.57.1",
"use_bidirectional_attention": false,
"use_cache": true,
"vocab_size": 262144
}

View File

@@ -0,0 +1,13 @@
{
"bos_token_id": 2,
"cache_implementation": "hybrid",
"do_sample": true,
"eos_token_id": [
1,
106
],
"pad_token_id": 0,
"top_k": 64,
"top_p": 0.95,
"transformers_version": "4.57.1"
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:614cc6e64080499c9a6d0f8b886511b048905831ac9d9b402567eaf808233339
size 1999811208

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d58ddc44f9b0fdd2997965634bb4deef6e26569ecd703e2e0ae7cabea45c1c2
size 3999834207

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:718a0f3db00824213036a2c0441849791319b7d9cf189065873bb26a7020738e
size 14645

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55e1f4356063c53108f9b1037e420f8b280ea03647d8984ddf7070afcc29d44a
size 1465

View File

@@ -0,0 +1,27 @@
{
"boi_token": "<start_of_image>",
"bos_token": {
"content": "<bos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eoi_token": "<end_of_image>",
"eos_token": {
"content": "<eos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"image_token": "<image_soft_token>",
"pad_token": "<eos>",
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db5eba787198c9cb1d12d0dc4d653f46747749da078219b0b3f4a11b7487eb19
size 33384832

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
size 4689074

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,118 @@
{
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 5.0,
"eval_steps": 500,
"global_step": 125,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.4,
"grad_norm": 9.0625,
"learning_rate": 4.64e-05,
"loss": 2.3787,
"step": 10
},
{
"epoch": 0.8,
"grad_norm": 4.96875,
"learning_rate": 4.24e-05,
"loss": 1.6716,
"step": 20
},
{
"epoch": 1.2,
"grad_norm": 4.78125,
"learning_rate": 3.8400000000000005e-05,
"loss": 1.61,
"step": 30
},
{
"epoch": 1.6,
"grad_norm": 5.28125,
"learning_rate": 3.4399999999999996e-05,
"loss": 1.5436,
"step": 40
},
{
"epoch": 2.0,
"grad_norm": 4.28125,
"learning_rate": 3.04e-05,
"loss": 1.501,
"step": 50
},
{
"epoch": 2.4,
"grad_norm": 5.21875,
"learning_rate": 2.64e-05,
"loss": 1.2763,
"step": 60
},
{
"epoch": 2.8,
"grad_norm": 11.9375,
"learning_rate": 2.2400000000000002e-05,
"loss": 1.2895,
"step": 70
},
{
"epoch": 3.2,
"grad_norm": 8.0625,
"learning_rate": 1.84e-05,
"loss": 1.2817,
"step": 80
},
{
"epoch": 3.6,
"grad_norm": 5.46875,
"learning_rate": 1.44e-05,
"loss": 1.0921,
"step": 90
},
{
"epoch": 4.0,
"grad_norm": 9.9375,
"learning_rate": 1.04e-05,
"loss": 1.1077,
"step": 100
},
{
"epoch": 4.4,
"grad_norm": 9.375,
"learning_rate": 6.4000000000000006e-06,
"loss": 1.0527,
"step": 110
},
{
"epoch": 4.8,
"grad_norm": 9.625,
"learning_rate": 2.4000000000000003e-06,
"loss": 0.8909,
"step": 120
}
],
"logging_steps": 10,
"max_steps": 125,
"num_input_tokens_seen": 0,
"num_train_epochs": 5,
"save_steps": 500,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": true
},
"attributes": {}
}
},
"total_flos": 267992088576000.0,
"train_batch_size": 4,
"trial_name": null,
"trial_params": null
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66fc152b1af2e146ef5d6f6082be4d11df0028f1616d6987048a20376d28b05a
size 5777

64
config.json Normal file
View File

@@ -0,0 +1,64 @@
{
"_sliding_window_pattern": 6,
"architectures": [
"Gemma3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": null,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"dtype": "bfloat16",
"eos_token_id": 1,
"final_logit_softcapping": null,
"head_dim": 256,
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 1152,
"initializer_range": 0.02,
"intermediate_size": 6912,
"layer_types": [
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention"
],
"max_position_embeddings": 32768,
"model_type": "gemma3_text",
"num_attention_heads": 4,
"num_hidden_layers": 26,
"num_key_value_heads": 1,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_local_base_freq": 10000,
"rope_scaling": null,
"rope_theta": 1000000,
"sliding_window": 512,
"sliding_window_pattern": 6,
"transformers_version": "4.57.1",
"use_bidirectional_attention": false,
"use_cache": true,
"vocab_size": 262144
}

13
generation_config.json Normal file
View File

@@ -0,0 +1,13 @@
{
"bos_token_id": 2,
"cache_implementation": "hybrid",
"do_sample": true,
"eos_token_id": [
1,
106
],
"pad_token_id": 0,
"top_k": 64,
"top_p": 0.95,
"transformers_version": "4.57.1"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:614cc6e64080499c9a6d0f8b886511b048905831ac9d9b402567eaf808233339
size 1999811208

27
special_tokens_map.json Normal file
View File

@@ -0,0 +1,27 @@
{
"boi_token": "<start_of_image>",
"bos_token": {
"content": "<bos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eoi_token": "<end_of_image>",
"eos_token": {
"content": "<eos>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"image_token": "<image_soft_token>",
"pad_token": "<eos>",
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db5eba787198c9cb1d12d0dc4d653f46747749da078219b0b3f4a11b7487eb19
size 33384832

3
tokenizer.model Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
size 4689074

51344
tokenizer_config.json Normal file

File diff suppressed because it is too large Load Diff

3
training_args.bin Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66fc152b1af2e146ef5d6f6082be4d11df0028f1616d6987048a20376d28b05a
size 5777