Upload PII detection model OpenMed-PII-QwenMed-XLarge-600M-v1
Browse files- .gitattributes +1 -0
- README.md +326 -0
- added_tokens.json +28 -0
- all_results.json +24 -0
- chat_template.jinja +85 -0
- config.json +276 -0
- eval_results.json +11 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +31 -0
- test_results.json +10 -0
- tokenizer.json +3 -0
- tokenizer_config.json +239 -0
- train_results.json +8 -0
- vocab.json +0 -0
.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
|
README.md
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
base_model: Qwen/Qwen3-Embedding-0.6B
|
| 6 |
+
tags:
|
| 7 |
+
- token-classification
|
| 8 |
+
- ner
|
| 9 |
+
- pii
|
| 10 |
+
- pii-detection
|
| 11 |
+
- de-identification
|
| 12 |
+
- privacy
|
| 13 |
+
- healthcare
|
| 14 |
+
- medical
|
| 15 |
+
- clinical
|
| 16 |
+
- phi
|
| 17 |
+
- hipaa
|
| 18 |
+
- pytorch
|
| 19 |
+
- transformers
|
| 20 |
+
- openmed
|
| 21 |
+
datasets:
|
| 22 |
+
- nvidia/Nemotron-PII
|
| 23 |
+
pipeline_tag: token-classification
|
| 24 |
+
library_name: transformers
|
| 25 |
+
metrics:
|
| 26 |
+
- f1
|
| 27 |
+
- precision
|
| 28 |
+
- recall
|
| 29 |
+
model-index:
|
| 30 |
+
- name: OpenMed-PII-QwenMed-600M-v1
|
| 31 |
+
results:
|
| 32 |
+
- task:
|
| 33 |
+
type: token-classification
|
| 34 |
+
name: Named Entity Recognition
|
| 35 |
+
dataset:
|
| 36 |
+
name: nvidia/Nemotron-PII (test_strat)
|
| 37 |
+
type: nvidia/Nemotron-PII
|
| 38 |
+
split: test
|
| 39 |
+
metrics:
|
| 40 |
+
- type: f1
|
| 41 |
+
value: 0.9124
|
| 42 |
+
name: F1 (micro)
|
| 43 |
+
- type: precision
|
| 44 |
+
value: 0.9075
|
| 45 |
+
name: Precision
|
| 46 |
+
- type: recall
|
| 47 |
+
value: 0.9173
|
| 48 |
+
name: Recall
|
| 49 |
+
widget:
|
| 50 |
+
- text: "Dr. Sarah Johnson (SSN: 123-45-6789) can be reached at sarah.johnson@hospital.org or 555-123-4567. She lives at 123 Oak Street, Boston, MA 02108."
|
| 51 |
+
example_title: Clinical Note with PII
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
# OpenMed-PII-QwenMed-600M-v1
|
| 55 |
+
|
| 56 |
+
**PII Detection Model** | 600M Parameters | Open Source
|
| 57 |
+
|
| 58 |
+
[]() []() []()
|
| 59 |
+
|
| 60 |
+
## Model Description
|
| 61 |
+
|
| 62 |
+
**OpenMed-PII-QwenMed-600M-v1** is a transformer-based token classification model fine-tuned for **Personally Identifiable Information (PII) detection** in text. This model identifies and classifies **54 types of sensitive information** including names, addresses, SSNs, medical record numbers, and more.
|
| 63 |
+
|
| 64 |
+
### Key Features
|
| 65 |
+
|
| 66 |
+
- **High Accuracy**: Achieves strong F1 scores across diverse PII categories
|
| 67 |
+
- **Comprehensive Coverage**: Detects 50+ entity types spanning personal, financial, medical, and contact information
|
| 68 |
+
- **Privacy-Focused**: Designed for de-identification and compliance with HIPAA, GDPR, and other privacy regulations
|
| 69 |
+
- **Production-Ready**: Optimized for real-world text processing pipelines
|
| 70 |
+
|
| 71 |
+
## Performance
|
| 72 |
+
|
| 73 |
+
Evaluated on a stratified 2,000-sample test set from NVIDIA Nemotron-PII:
|
| 74 |
+
|
| 75 |
+
| Metric | Score |
|
| 76 |
+
|:---|:---:|
|
| 77 |
+
| **Micro F1** | **0.9124** |
|
| 78 |
+
| Precision | 0.9075 |
|
| 79 |
+
| Recall | 0.9173 |
|
| 80 |
+
| Macro F1 | 0.9268 |
|
| 81 |
+
| Weighted F1 | 0.9121 |
|
| 82 |
+
| Accuracy | 0.9913 |
|
| 83 |
+
|
| 84 |
+
### Top 10 PII Models
|
| 85 |
+
|
| 86 |
+
| Rank | Model | F1 | Precision | Recall |
|
| 87 |
+
|:---:|:---|:---:|:---:|:---:|
|
| 88 |
+
| 1 | [OpenMed-PII-SuperClinical-Large-434M-v1](https://huggingface.co/openmed/OpenMed-PII-SuperClinical-Large-434M-v1) | 0.9608 | 0.9685 | 0.9532 |
|
| 89 |
+
| 2 | [OpenMed-PII-BigMed-Large-560M-v1](https://huggingface.co/openmed/OpenMed-PII-BigMed-Large-560M-v1) | 0.9604 | 0.9644 | 0.9565 |
|
| 90 |
+
| 3 | [OpenMed-PII-EuroMed-210M-v1](https://huggingface.co/openmed/OpenMed-PII-EuroMed-210M-v1) | 0.9600 | 0.9681 | 0.9521 |
|
| 91 |
+
| 4 | [OpenMed-PII-SnowflakeMed-568M-v1](https://huggingface.co/openmed/OpenMed-PII-SnowflakeMed-568M-v1) | 0.9594 | 0.9640 | 0.9548 |
|
| 92 |
+
| 5 | [OpenMed-PII-SuperMedical-Large-355M-v1](https://huggingface.co/openmed/OpenMed-PII-SuperMedical-Large-355M-v1) | 0.9592 | 0.9632 | 0.9553 |
|
| 93 |
+
| 6 | [OpenMed-PII-ClinicalBGE-568M-v1](https://huggingface.co/openmed/OpenMed-PII-ClinicalBGE-568M-v1) | 0.9587 | 0.9636 | 0.9538 |
|
| 94 |
+
| 7 | [OpenMed-PII-mClinicalE5-Large-560M-v1](https://huggingface.co/openmed/OpenMed-PII-mClinicalE5-Large-560M-v1) | 0.9582 | 0.9631 | 0.9533 |
|
| 95 |
+
| 8 | [OpenMed-PII-ModernMed-Large-395M-v1](https://huggingface.co/openmed/OpenMed-PII-ModernMed-Large-395M-v1) | 0.9579 | 0.9639 | 0.9520 |
|
| 96 |
+
| 9 | [OpenMed-PII-BioClinicalModern-Large-395M-v1](https://huggingface.co/openmed/OpenMed-PII-BioClinicalModern-Large-395M-v1) | 0.9579 | 0.9656 | 0.9502 |
|
| 97 |
+
| 10 | [OpenMed-PII-ClinicalE5-Large-335M-v1](https://huggingface.co/openmed/OpenMed-PII-ClinicalE5-Large-335M-v1) | 0.9577 | 0.9604 | 0.9550 |
|
| 98 |
+
|
| 99 |
+
### Best Performing Entities
|
| 100 |
+
|
| 101 |
+
| Entity | F1 | Precision | Recall | Support |
|
| 102 |
+
|:---|:---:|:---:|:---:|:---:|
|
| 103 |
+
| `blood_type` | 0.992 | 0.992 | 0.992 | 132 |
|
| 104 |
+
| `biometric_identifier` | 0.991 | 0.991 | 0.991 | 224 |
|
| 105 |
+
| `swift_bic` | 0.990 | 0.980 | 1.000 | 97 |
|
| 106 |
+
| `cvv` | 0.989 | 1.000 | 0.978 | 92 |
|
| 107 |
+
| `bank_routing_number` | 0.988 | 0.992 | 0.984 | 128 |
|
| 108 |
+
|
| 109 |
+
### Challenging Entities
|
| 110 |
+
|
| 111 |
+
These entity types have lower performance and may benefit from additional post-processing:
|
| 112 |
+
|
| 113 |
+
| Entity | F1 | Precision | Recall | Support |
|
| 114 |
+
|:---|:---:|:---:|:---:|:---:|
|
| 115 |
+
| `county` | 0.821 | 0.770 | 0.879 | 313 |
|
| 116 |
+
| `company_name` | 0.811 | 0.778 | 0.846 | 857 |
|
| 117 |
+
| `time` | 0.784 | 0.778 | 0.789 | 459 |
|
| 118 |
+
| `date_time` | 0.642 | 0.583 | 0.714 | 227 |
|
| 119 |
+
| `occupation` | 0.567 | 0.609 | 0.530 | 692 |
|
| 120 |
+
|
| 121 |
+
## Supported Entity Types
|
| 122 |
+
|
| 123 |
+
This model detects **54 PII entity types** organized into categories:
|
| 124 |
+
|
| 125 |
+
<details>
|
| 126 |
+
<summary><strong>Identifiers</strong> (16 types)</summary>
|
| 127 |
+
|
| 128 |
+
| Entity | Description |
|
| 129 |
+
|:---|:---|
|
| 130 |
+
| `account_number` | Account Number |
|
| 131 |
+
| `api_key` | Api Key |
|
| 132 |
+
| `bank_routing_number` | Bank Routing Number |
|
| 133 |
+
| `certificate_license_number` | Certificate License Number |
|
| 134 |
+
| `credit_debit_card` | Credit Debit Card |
|
| 135 |
+
| `cvv` | Cvv |
|
| 136 |
+
| `employee_id` | Employee Id |
|
| 137 |
+
| `health_plan_beneficiary_number` | Health Plan Beneficiary Number |
|
| 138 |
+
| `mac_address` | Mac Address |
|
| 139 |
+
| `medical_record_number` | Medical Record Number |
|
| 140 |
+
| ... | *and 6 more* |
|
| 141 |
+
|
| 142 |
+
</details>
|
| 143 |
+
|
| 144 |
+
<details>
|
| 145 |
+
<summary><strong>Personal Info</strong> (14 types)</summary>
|
| 146 |
+
|
| 147 |
+
| Entity | Description |
|
| 148 |
+
|:---|:---|
|
| 149 |
+
| `age` | Age |
|
| 150 |
+
| `biometric_identifier` | Biometric Identifier |
|
| 151 |
+
| `blood_type` | Blood Type |
|
| 152 |
+
| `date_of_birth` | Date Of Birth |
|
| 153 |
+
| `education_level` | Education Level |
|
| 154 |
+
| `first_name` | First Name |
|
| 155 |
+
| `last_name` | Last Name |
|
| 156 |
+
| `gender` | Gender |
|
| 157 |
+
| `language` | Language |
|
| 158 |
+
| `occupation` | Occupation |
|
| 159 |
+
| ... | *and 4 more* |
|
| 160 |
+
|
| 161 |
+
</details>
|
| 162 |
+
|
| 163 |
+
<details>
|
| 164 |
+
<summary><strong>Contact Info</strong> (4 types)</summary>
|
| 165 |
+
|
| 166 |
+
| Entity | Description |
|
| 167 |
+
|:---|:---|
|
| 168 |
+
| `email` | Email |
|
| 169 |
+
| `phone_number` | Phone Number |
|
| 170 |
+
| `fax_number` | Fax Number |
|
| 171 |
+
| `url` | Url |
|
| 172 |
+
|
| 173 |
+
</details>
|
| 174 |
+
|
| 175 |
+
<details>
|
| 176 |
+
<summary><strong>Location</strong> (6 types)</summary>
|
| 177 |
+
|
| 178 |
+
| Entity | Description |
|
| 179 |
+
|:---|:---|
|
| 180 |
+
| `city` | City |
|
| 181 |
+
| `coordinate` | Coordinate |
|
| 182 |
+
| `country` | Country |
|
| 183 |
+
| `county` | County |
|
| 184 |
+
| `state` | State |
|
| 185 |
+
| `street_address` | Street Address |
|
| 186 |
+
|
| 187 |
+
</details>
|
| 188 |
+
|
| 189 |
+
<details>
|
| 190 |
+
<summary><strong>Network Info</strong> (3 types)</summary>
|
| 191 |
+
|
| 192 |
+
| Entity | Description |
|
| 193 |
+
|:---|:---|
|
| 194 |
+
| `device_identifier` | Device Identifier |
|
| 195 |
+
| `ipv4` | Ipv4 |
|
| 196 |
+
| `ipv6` | Ipv6 |
|
| 197 |
+
|
| 198 |
+
</details>
|
| 199 |
+
|
| 200 |
+
<details>
|
| 201 |
+
<summary><strong>Temporal</strong> (3 types)</summary>
|
| 202 |
+
|
| 203 |
+
| Entity | Description |
|
| 204 |
+
|:---|:---|
|
| 205 |
+
| `date` | Date |
|
| 206 |
+
| `date_time` | Date Time |
|
| 207 |
+
| `time` | Time |
|
| 208 |
+
|
| 209 |
+
</details>
|
| 210 |
+
|
| 211 |
+
<details>
|
| 212 |
+
<summary><strong>Organization</strong> (1 types)</summary>
|
| 213 |
+
|
| 214 |
+
| Entity | Description |
|
| 215 |
+
|:---|:---|
|
| 216 |
+
| `company_name` | Company Name |
|
| 217 |
+
|
| 218 |
+
</details>
|
| 219 |
+
|
| 220 |
+
## Usage
|
| 221 |
+
|
| 222 |
+
### Quick Start
|
| 223 |
+
|
| 224 |
+
```python
|
| 225 |
+
from transformers import pipeline
|
| 226 |
+
|
| 227 |
+
# Load the PII detection pipeline
|
| 228 |
+
ner = pipeline("ner", model="openmed/OpenMed-PII-QwenMed-600M-v1", aggregation_strategy="simple")
|
| 229 |
+
|
| 230 |
+
text = """
|
| 231 |
+
Patient John Smith (DOB: 03/15/1985, SSN: 123-45-6789) was seen today.
|
| 232 |
+
Contact: john.smith@email.com, Phone: (555) 123-4567.
|
| 233 |
+
Address: 456 Oak Street, Boston, MA 02108.
|
| 234 |
+
"""
|
| 235 |
+
|
| 236 |
+
entities = ner(text)
|
| 237 |
+
for entity in entities:
|
| 238 |
+
print(f"{entity['entity_group']}: {entity['word']} (score: {entity['score']:.3f})")
|
| 239 |
+
```
|
| 240 |
+
|
| 241 |
+
### De-identification Example
|
| 242 |
+
|
| 243 |
+
```python
|
| 244 |
+
def redact_pii(text, entities, placeholder='[REDACTED]'):
|
| 245 |
+
"""Replace detected PII with placeholders."""
|
| 246 |
+
# Sort entities by start position (descending) to preserve offsets
|
| 247 |
+
sorted_entities = sorted(entities, key=lambda x: x['start'], reverse=True)
|
| 248 |
+
redacted = text
|
| 249 |
+
for ent in sorted_entities:
|
| 250 |
+
redacted = redacted[:ent['start']] + f"[{ent['entity_group']}]" + redacted[ent['end']:]
|
| 251 |
+
return redacted
|
| 252 |
+
|
| 253 |
+
# Apply de-identification
|
| 254 |
+
redacted_text = redact_pii(text, entities)
|
| 255 |
+
print(redacted_text)
|
| 256 |
+
```
|
| 257 |
+
|
| 258 |
+
### Batch Processing
|
| 259 |
+
|
| 260 |
+
```python
|
| 261 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
| 262 |
+
import torch
|
| 263 |
+
|
| 264 |
+
model_name = "openmed/OpenMed-PII-QwenMed-600M-v1"
|
| 265 |
+
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
| 266 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 267 |
+
|
| 268 |
+
texts = [
|
| 269 |
+
"Contact Dr. Jane Doe at jane.doe@hospital.org",
|
| 270 |
+
"Patient SSN: 987-65-4321, MRN: 12345678",
|
| 271 |
+
]
|
| 272 |
+
|
| 273 |
+
inputs = tokenizer(texts, return_tensors='pt', padding=True, truncation=True)
|
| 274 |
+
with torch.no_grad():
|
| 275 |
+
outputs = model(**inputs)
|
| 276 |
+
predictions = torch.argmax(outputs.logits, dim=-1)
|
| 277 |
+
```
|
| 278 |
+
|
| 279 |
+
## Training Details
|
| 280 |
+
|
| 281 |
+
### Dataset
|
| 282 |
+
|
| 283 |
+
- **Source**: [NVIDIA Nemotron-PII](https://huggingface.co/datasets/nvidia/Nemotron-PII)
|
| 284 |
+
- **Format**: BIO-tagged token classification
|
| 285 |
+
- **Labels**: 106 total (53 entity types × 2 BIO tags + O)
|
| 286 |
+
- **Splits**: 50K train / 5K validation / 45K test
|
| 287 |
+
|
| 288 |
+
### Training Configuration
|
| 289 |
+
|
| 290 |
+
- **Max Sequence Length**: 384 tokens
|
| 291 |
+
- **Label Strategy**: First token only (`label_all_tokens=False`)
|
| 292 |
+
- **Framework**: Hugging Face Transformers + Trainer API
|
| 293 |
+
|
| 294 |
+
## Intended Use & Limitations
|
| 295 |
+
|
| 296 |
+
### Intended Use
|
| 297 |
+
|
| 298 |
+
- **De-identification**: Automated redaction of PII in clinical notes, medical records, and documents
|
| 299 |
+
- **Compliance**: Supporting HIPAA, GDPR, and privacy regulation compliance
|
| 300 |
+
- **Data Preprocessing**: Preparing datasets for research by removing sensitive information
|
| 301 |
+
- **Audit Support**: Identifying PII in document collections
|
| 302 |
+
|
| 303 |
+
### Limitations
|
| 304 |
+
|
| 305 |
+
⚠️ **Important**: This model is intended as an **assistive tool**, not a replacement for human review.
|
| 306 |
+
|
| 307 |
+
- **False Negatives**: Some PII may not be detected; always verify critical applications
|
| 308 |
+
- **Context Sensitivity**: Performance may vary with domain-specific terminology
|
| 309 |
+
- **Challenging Categories**: `occupation`, `time`, and `sexuality` have lower F1 scores
|
| 310 |
+
- **Language**: Primarily trained on English text
|
| 311 |
+
|
| 312 |
+
## Citation
|
| 313 |
+
|
| 314 |
+
```bibtex
|
| 315 |
+
@misc{openmed-pii-2026,
|
| 316 |
+
title = {OpenMed-PII-QwenMed-600M-v1: PII Detection Model},
|
| 317 |
+
author = {OpenMed Science},
|
| 318 |
+
year = {2026},
|
| 319 |
+
publisher = {Hugging Face},
|
| 320 |
+
url = {https://huggingface.co/openmed/OpenMed-PII-QwenMed-600M-v1}
|
| 321 |
+
}
|
| 322 |
+
```
|
| 323 |
+
|
| 324 |
+
## Links
|
| 325 |
+
|
| 326 |
+
- **Organization**: [OpenMed](https://huggingface.co/OpenMed)
|
added_tokens.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</think>": 151668,
|
| 3 |
+
"</tool_call>": 151658,
|
| 4 |
+
"</tool_response>": 151666,
|
| 5 |
+
"<think>": 151667,
|
| 6 |
+
"<tool_call>": 151657,
|
| 7 |
+
"<tool_response>": 151665,
|
| 8 |
+
"<|box_end|>": 151649,
|
| 9 |
+
"<|box_start|>": 151648,
|
| 10 |
+
"<|endoftext|>": 151643,
|
| 11 |
+
"<|file_sep|>": 151664,
|
| 12 |
+
"<|fim_middle|>": 151660,
|
| 13 |
+
"<|fim_pad|>": 151662,
|
| 14 |
+
"<|fim_prefix|>": 151659,
|
| 15 |
+
"<|fim_suffix|>": 151661,
|
| 16 |
+
"<|im_end|>": 151645,
|
| 17 |
+
"<|im_start|>": 151644,
|
| 18 |
+
"<|image_pad|>": 151655,
|
| 19 |
+
"<|object_ref_end|>": 151647,
|
| 20 |
+
"<|object_ref_start|>": 151646,
|
| 21 |
+
"<|quad_end|>": 151651,
|
| 22 |
+
"<|quad_start|>": 151650,
|
| 23 |
+
"<|repo_name|>": 151663,
|
| 24 |
+
"<|video_pad|>": 151656,
|
| 25 |
+
"<|vision_end|>": 151653,
|
| 26 |
+
"<|vision_pad|>": 151654,
|
| 27 |
+
"<|vision_start|>": 151652
|
| 28 |
+
}
|
all_results.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"eval_accuracy": 0.9925593277143512,
|
| 4 |
+
"eval_f1": 0.9153898869254491,
|
| 5 |
+
"eval_loss": 0.13752934336662292,
|
| 6 |
+
"eval_precision": 0.9089826471588975,
|
| 7 |
+
"eval_recall": 0.9218880946512201,
|
| 8 |
+
"eval_runtime": 44.5278,
|
| 9 |
+
"eval_samples_per_second": 112.29,
|
| 10 |
+
"eval_steps_per_second": 1.774,
|
| 11 |
+
"test_accuracy": 0.9924453410344638,
|
| 12 |
+
"test_f1": 0.9140644974746899,
|
| 13 |
+
"test_loss": 0.13219766318798065,
|
| 14 |
+
"test_precision": 0.9066935772994649,
|
| 15 |
+
"test_recall": 0.9215562429483753,
|
| 16 |
+
"test_runtime": 434.1499,
|
| 17 |
+
"test_samples_per_second": 103.651,
|
| 18 |
+
"test_steps_per_second": 1.622,
|
| 19 |
+
"total_flos": 1.06313819966443e+17,
|
| 20 |
+
"train_loss": 0.22251781229526407,
|
| 21 |
+
"train_runtime": 4069.8044,
|
| 22 |
+
"train_samples_per_second": 36.857,
|
| 23 |
+
"train_steps_per_second": 1.152
|
| 24 |
+
}
|
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,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3ForTokenClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"eos_token_id": 151645,
|
| 9 |
+
"head_dim": 128,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 1024,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "O",
|
| 14 |
+
"1": "B-account_number",
|
| 15 |
+
"2": "B-age",
|
| 16 |
+
"3": "B-api_key",
|
| 17 |
+
"4": "B-bank_routing_number",
|
| 18 |
+
"5": "B-biometric_identifier",
|
| 19 |
+
"6": "B-blood_type",
|
| 20 |
+
"7": "B-certificate_license_number",
|
| 21 |
+
"8": "B-city",
|
| 22 |
+
"9": "B-company_name",
|
| 23 |
+
"10": "B-coordinate",
|
| 24 |
+
"11": "B-country",
|
| 25 |
+
"12": "B-county",
|
| 26 |
+
"13": "B-credit_debit_card",
|
| 27 |
+
"14": "B-customer_id",
|
| 28 |
+
"15": "B-cvv",
|
| 29 |
+
"16": "B-date",
|
| 30 |
+
"17": "B-date_of_birth",
|
| 31 |
+
"18": "B-date_time",
|
| 32 |
+
"19": "B-device_identifier",
|
| 33 |
+
"20": "B-education_level",
|
| 34 |
+
"21": "B-email",
|
| 35 |
+
"22": "B-employee_id",
|
| 36 |
+
"23": "B-employment_status",
|
| 37 |
+
"24": "B-fax_number",
|
| 38 |
+
"25": "B-first_name",
|
| 39 |
+
"26": "B-gender",
|
| 40 |
+
"27": "B-health_plan_beneficiary_number",
|
| 41 |
+
"28": "B-http_cookie",
|
| 42 |
+
"29": "B-ipv4",
|
| 43 |
+
"30": "B-ipv6",
|
| 44 |
+
"31": "B-language",
|
| 45 |
+
"32": "B-last_name",
|
| 46 |
+
"33": "B-license_plate",
|
| 47 |
+
"34": "B-mac_address",
|
| 48 |
+
"35": "B-medical_record_number",
|
| 49 |
+
"36": "B-occupation",
|
| 50 |
+
"37": "B-password",
|
| 51 |
+
"38": "B-phone_number",
|
| 52 |
+
"39": "B-pin",
|
| 53 |
+
"40": "B-political_view",
|
| 54 |
+
"41": "B-postcode",
|
| 55 |
+
"42": "B-race_ethnicity",
|
| 56 |
+
"43": "B-religious_belief",
|
| 57 |
+
"44": "B-sexuality",
|
| 58 |
+
"45": "B-ssn",
|
| 59 |
+
"46": "B-state",
|
| 60 |
+
"47": "B-street_address",
|
| 61 |
+
"48": "B-swift_bic",
|
| 62 |
+
"49": "B-tax_id",
|
| 63 |
+
"50": "B-time",
|
| 64 |
+
"51": "B-unique_id",
|
| 65 |
+
"52": "B-url",
|
| 66 |
+
"53": "B-user_name",
|
| 67 |
+
"54": "B-vehicle_identifier",
|
| 68 |
+
"55": "I-account_number",
|
| 69 |
+
"56": "I-api_key",
|
| 70 |
+
"57": "I-biometric_identifier",
|
| 71 |
+
"58": "I-blood_type",
|
| 72 |
+
"59": "I-certificate_license_number",
|
| 73 |
+
"60": "I-city",
|
| 74 |
+
"61": "I-company_name",
|
| 75 |
+
"62": "I-coordinate",
|
| 76 |
+
"63": "I-country",
|
| 77 |
+
"64": "I-county",
|
| 78 |
+
"65": "I-credit_debit_card",
|
| 79 |
+
"66": "I-customer_id",
|
| 80 |
+
"67": "I-date",
|
| 81 |
+
"68": "I-date_of_birth",
|
| 82 |
+
"69": "I-date_time",
|
| 83 |
+
"70": "I-device_identifier",
|
| 84 |
+
"71": "I-education_level",
|
| 85 |
+
"72": "I-email",
|
| 86 |
+
"73": "I-employee_id",
|
| 87 |
+
"74": "I-employment_status",
|
| 88 |
+
"75": "I-fax_number",
|
| 89 |
+
"76": "I-first_name",
|
| 90 |
+
"77": "I-gender",
|
| 91 |
+
"78": "I-health_plan_beneficiary_number",
|
| 92 |
+
"79": "I-http_cookie",
|
| 93 |
+
"80": "I-ipv4",
|
| 94 |
+
"81": "I-ipv6",
|
| 95 |
+
"82": "I-language",
|
| 96 |
+
"83": "I-last_name",
|
| 97 |
+
"84": "I-license_plate",
|
| 98 |
+
"85": "I-mac_address",
|
| 99 |
+
"86": "I-medical_record_number",
|
| 100 |
+
"87": "I-occupation",
|
| 101 |
+
"88": "I-password",
|
| 102 |
+
"89": "I-phone_number",
|
| 103 |
+
"90": "I-pin",
|
| 104 |
+
"91": "I-political_view",
|
| 105 |
+
"92": "I-postcode",
|
| 106 |
+
"93": "I-race_ethnicity",
|
| 107 |
+
"94": "I-religious_belief",
|
| 108 |
+
"95": "I-sexuality",
|
| 109 |
+
"96": "I-ssn",
|
| 110 |
+
"97": "I-state",
|
| 111 |
+
"98": "I-street_address",
|
| 112 |
+
"99": "I-swift_bic",
|
| 113 |
+
"100": "I-tax_id",
|
| 114 |
+
"101": "I-time",
|
| 115 |
+
"102": "I-unique_id",
|
| 116 |
+
"103": "I-url",
|
| 117 |
+
"104": "I-user_name",
|
| 118 |
+
"105": "I-vehicle_identifier"
|
| 119 |
+
},
|
| 120 |
+
"initializer_range": 0.02,
|
| 121 |
+
"intermediate_size": 3072,
|
| 122 |
+
"label2id": {
|
| 123 |
+
"B-account_number": 1,
|
| 124 |
+
"B-age": 2,
|
| 125 |
+
"B-api_key": 3,
|
| 126 |
+
"B-bank_routing_number": 4,
|
| 127 |
+
"B-biometric_identifier": 5,
|
| 128 |
+
"B-blood_type": 6,
|
| 129 |
+
"B-certificate_license_number": 7,
|
| 130 |
+
"B-city": 8,
|
| 131 |
+
"B-company_name": 9,
|
| 132 |
+
"B-coordinate": 10,
|
| 133 |
+
"B-country": 11,
|
| 134 |
+
"B-county": 12,
|
| 135 |
+
"B-credit_debit_card": 13,
|
| 136 |
+
"B-customer_id": 14,
|
| 137 |
+
"B-cvv": 15,
|
| 138 |
+
"B-date": 16,
|
| 139 |
+
"B-date_of_birth": 17,
|
| 140 |
+
"B-date_time": 18,
|
| 141 |
+
"B-device_identifier": 19,
|
| 142 |
+
"B-education_level": 20,
|
| 143 |
+
"B-email": 21,
|
| 144 |
+
"B-employee_id": 22,
|
| 145 |
+
"B-employment_status": 23,
|
| 146 |
+
"B-fax_number": 24,
|
| 147 |
+
"B-first_name": 25,
|
| 148 |
+
"B-gender": 26,
|
| 149 |
+
"B-health_plan_beneficiary_number": 27,
|
| 150 |
+
"B-http_cookie": 28,
|
| 151 |
+
"B-ipv4": 29,
|
| 152 |
+
"B-ipv6": 30,
|
| 153 |
+
"B-language": 31,
|
| 154 |
+
"B-last_name": 32,
|
| 155 |
+
"B-license_plate": 33,
|
| 156 |
+
"B-mac_address": 34,
|
| 157 |
+
"B-medical_record_number": 35,
|
| 158 |
+
"B-occupation": 36,
|
| 159 |
+
"B-password": 37,
|
| 160 |
+
"B-phone_number": 38,
|
| 161 |
+
"B-pin": 39,
|
| 162 |
+
"B-political_view": 40,
|
| 163 |
+
"B-postcode": 41,
|
| 164 |
+
"B-race_ethnicity": 42,
|
| 165 |
+
"B-religious_belief": 43,
|
| 166 |
+
"B-sexuality": 44,
|
| 167 |
+
"B-ssn": 45,
|
| 168 |
+
"B-state": 46,
|
| 169 |
+
"B-street_address": 47,
|
| 170 |
+
"B-swift_bic": 48,
|
| 171 |
+
"B-tax_id": 49,
|
| 172 |
+
"B-time": 50,
|
| 173 |
+
"B-unique_id": 51,
|
| 174 |
+
"B-url": 52,
|
| 175 |
+
"B-user_name": 53,
|
| 176 |
+
"B-vehicle_identifier": 54,
|
| 177 |
+
"I-account_number": 55,
|
| 178 |
+
"I-api_key": 56,
|
| 179 |
+
"I-biometric_identifier": 57,
|
| 180 |
+
"I-blood_type": 58,
|
| 181 |
+
"I-certificate_license_number": 59,
|
| 182 |
+
"I-city": 60,
|
| 183 |
+
"I-company_name": 61,
|
| 184 |
+
"I-coordinate": 62,
|
| 185 |
+
"I-country": 63,
|
| 186 |
+
"I-county": 64,
|
| 187 |
+
"I-credit_debit_card": 65,
|
| 188 |
+
"I-customer_id": 66,
|
| 189 |
+
"I-date": 67,
|
| 190 |
+
"I-date_of_birth": 68,
|
| 191 |
+
"I-date_time": 69,
|
| 192 |
+
"I-device_identifier": 70,
|
| 193 |
+
"I-education_level": 71,
|
| 194 |
+
"I-email": 72,
|
| 195 |
+
"I-employee_id": 73,
|
| 196 |
+
"I-employment_status": 74,
|
| 197 |
+
"I-fax_number": 75,
|
| 198 |
+
"I-first_name": 76,
|
| 199 |
+
"I-gender": 77,
|
| 200 |
+
"I-health_plan_beneficiary_number": 78,
|
| 201 |
+
"I-http_cookie": 79,
|
| 202 |
+
"I-ipv4": 80,
|
| 203 |
+
"I-ipv6": 81,
|
| 204 |
+
"I-language": 82,
|
| 205 |
+
"I-last_name": 83,
|
| 206 |
+
"I-license_plate": 84,
|
| 207 |
+
"I-mac_address": 85,
|
| 208 |
+
"I-medical_record_number": 86,
|
| 209 |
+
"I-occupation": 87,
|
| 210 |
+
"I-password": 88,
|
| 211 |
+
"I-phone_number": 89,
|
| 212 |
+
"I-pin": 90,
|
| 213 |
+
"I-political_view": 91,
|
| 214 |
+
"I-postcode": 92,
|
| 215 |
+
"I-race_ethnicity": 93,
|
| 216 |
+
"I-religious_belief": 94,
|
| 217 |
+
"I-sexuality": 95,
|
| 218 |
+
"I-ssn": 96,
|
| 219 |
+
"I-state": 97,
|
| 220 |
+
"I-street_address": 98,
|
| 221 |
+
"I-swift_bic": 99,
|
| 222 |
+
"I-tax_id": 100,
|
| 223 |
+
"I-time": 101,
|
| 224 |
+
"I-unique_id": 102,
|
| 225 |
+
"I-url": 103,
|
| 226 |
+
"I-user_name": 104,
|
| 227 |
+
"I-vehicle_identifier": 105,
|
| 228 |
+
"O": 0
|
| 229 |
+
},
|
| 230 |
+
"layer_types": [
|
| 231 |
+
"full_attention",
|
| 232 |
+
"full_attention",
|
| 233 |
+
"full_attention",
|
| 234 |
+
"full_attention",
|
| 235 |
+
"full_attention",
|
| 236 |
+
"full_attention",
|
| 237 |
+
"full_attention",
|
| 238 |
+
"full_attention",
|
| 239 |
+
"full_attention",
|
| 240 |
+
"full_attention",
|
| 241 |
+
"full_attention",
|
| 242 |
+
"full_attention",
|
| 243 |
+
"full_attention",
|
| 244 |
+
"full_attention",
|
| 245 |
+
"full_attention",
|
| 246 |
+
"full_attention",
|
| 247 |
+
"full_attention",
|
| 248 |
+
"full_attention",
|
| 249 |
+
"full_attention",
|
| 250 |
+
"full_attention",
|
| 251 |
+
"full_attention",
|
| 252 |
+
"full_attention",
|
| 253 |
+
"full_attention",
|
| 254 |
+
"full_attention",
|
| 255 |
+
"full_attention",
|
| 256 |
+
"full_attention",
|
| 257 |
+
"full_attention",
|
| 258 |
+
"full_attention"
|
| 259 |
+
],
|
| 260 |
+
"max_position_embeddings": 32768,
|
| 261 |
+
"max_window_layers": 28,
|
| 262 |
+
"model_type": "qwen3",
|
| 263 |
+
"num_attention_heads": 16,
|
| 264 |
+
"num_hidden_layers": 28,
|
| 265 |
+
"num_key_value_heads": 8,
|
| 266 |
+
"pad_token_id": 151643,
|
| 267 |
+
"rms_norm_eps": 1e-06,
|
| 268 |
+
"rope_scaling": null,
|
| 269 |
+
"rope_theta": 1000000,
|
| 270 |
+
"sliding_window": null,
|
| 271 |
+
"tie_word_embeddings": true,
|
| 272 |
+
"transformers_version": "4.57.1",
|
| 273 |
+
"use_cache": true,
|
| 274 |
+
"use_sliding_window": false,
|
| 275 |
+
"vocab_size": 151669
|
| 276 |
+
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"eval_accuracy": 0.9925593277143512,
|
| 4 |
+
"eval_f1": 0.9153898869254491,
|
| 5 |
+
"eval_loss": 0.13752934336662292,
|
| 6 |
+
"eval_precision": 0.9089826471588975,
|
| 7 |
+
"eval_recall": 0.9218880946512201,
|
| 8 |
+
"eval_runtime": 44.5278,
|
| 9 |
+
"eval_samples_per_second": 112.29,
|
| 10 |
+
"eval_steps_per_second": 1.774
|
| 11 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:afccad23ee02a3c7d23642d7236b004d431ea7ac63d2810ffd1e65449232283b
|
| 3 |
+
size 2383576112
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
+
"eos_token": {
|
| 18 |
+
"content": "<|im_end|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
"pad_token": {
|
| 25 |
+
"content": "<|endoftext|>",
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"normalized": false,
|
| 28 |
+
"rstrip": false,
|
| 29 |
+
"single_word": false
|
| 30 |
+
}
|
| 31 |
+
}
|
test_results.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"test_accuracy": 0.9924453410344638,
|
| 3 |
+
"test_f1": 0.9140644974746899,
|
| 4 |
+
"test_loss": 0.13219766318798065,
|
| 5 |
+
"test_precision": 0.9066935772994649,
|
| 6 |
+
"test_recall": 0.9215562429483753,
|
| 7 |
+
"test_runtime": 434.1499,
|
| 8 |
+
"test_samples_per_second": 103.651,
|
| 9 |
+
"test_steps_per_second": 1.622
|
| 10 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4689bbafe5096d0a16cf2849ede8c67a98d4925bde8eba491f4a6839b1954fc6
|
| 3 |
+
size 11423803
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_prefix_space": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"151643": {
|
| 6 |
+
"content": "<|endoftext|>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"151644": {
|
| 14 |
+
"content": "<|im_start|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"151645": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"151646": {
|
| 30 |
+
"content": "<|object_ref_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"151647": {
|
| 38 |
+
"content": "<|object_ref_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"151648": {
|
| 46 |
+
"content": "<|box_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"151649": {
|
| 54 |
+
"content": "<|box_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"151650": {
|
| 62 |
+
"content": "<|quad_start|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"151651": {
|
| 70 |
+
"content": "<|quad_end|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"151652": {
|
| 78 |
+
"content": "<|vision_start|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"151653": {
|
| 86 |
+
"content": "<|vision_end|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"151654": {
|
| 94 |
+
"content": "<|vision_pad|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"151655": {
|
| 102 |
+
"content": "<|image_pad|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"151656": {
|
| 110 |
+
"content": "<|video_pad|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"151657": {
|
| 118 |
+
"content": "<tool_call>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": false
|
| 124 |
+
},
|
| 125 |
+
"151658": {
|
| 126 |
+
"content": "</tool_call>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": false
|
| 132 |
+
},
|
| 133 |
+
"151659": {
|
| 134 |
+
"content": "<|fim_prefix|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": false
|
| 140 |
+
},
|
| 141 |
+
"151660": {
|
| 142 |
+
"content": "<|fim_middle|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": false
|
| 148 |
+
},
|
| 149 |
+
"151661": {
|
| 150 |
+
"content": "<|fim_suffix|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": false
|
| 156 |
+
},
|
| 157 |
+
"151662": {
|
| 158 |
+
"content": "<|fim_pad|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": false
|
| 164 |
+
},
|
| 165 |
+
"151663": {
|
| 166 |
+
"content": "<|repo_name|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": false
|
| 172 |
+
},
|
| 173 |
+
"151664": {
|
| 174 |
+
"content": "<|file_sep|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": false
|
| 180 |
+
},
|
| 181 |
+
"151665": {
|
| 182 |
+
"content": "<tool_response>",
|
| 183 |
+
"lstrip": false,
|
| 184 |
+
"normalized": false,
|
| 185 |
+
"rstrip": false,
|
| 186 |
+
"single_word": false,
|
| 187 |
+
"special": false
|
| 188 |
+
},
|
| 189 |
+
"151666": {
|
| 190 |
+
"content": "</tool_response>",
|
| 191 |
+
"lstrip": false,
|
| 192 |
+
"normalized": false,
|
| 193 |
+
"rstrip": false,
|
| 194 |
+
"single_word": false,
|
| 195 |
+
"special": false
|
| 196 |
+
},
|
| 197 |
+
"151667": {
|
| 198 |
+
"content": "<think>",
|
| 199 |
+
"lstrip": false,
|
| 200 |
+
"normalized": false,
|
| 201 |
+
"rstrip": false,
|
| 202 |
+
"single_word": false,
|
| 203 |
+
"special": false
|
| 204 |
+
},
|
| 205 |
+
"151668": {
|
| 206 |
+
"content": "</think>",
|
| 207 |
+
"lstrip": false,
|
| 208 |
+
"normalized": false,
|
| 209 |
+
"rstrip": false,
|
| 210 |
+
"single_word": false,
|
| 211 |
+
"special": false
|
| 212 |
+
}
|
| 213 |
+
},
|
| 214 |
+
"additional_special_tokens": [
|
| 215 |
+
"<|im_start|>",
|
| 216 |
+
"<|im_end|>",
|
| 217 |
+
"<|object_ref_start|>",
|
| 218 |
+
"<|object_ref_end|>",
|
| 219 |
+
"<|box_start|>",
|
| 220 |
+
"<|box_end|>",
|
| 221 |
+
"<|quad_start|>",
|
| 222 |
+
"<|quad_end|>",
|
| 223 |
+
"<|vision_start|>",
|
| 224 |
+
"<|vision_end|>",
|
| 225 |
+
"<|vision_pad|>",
|
| 226 |
+
"<|image_pad|>",
|
| 227 |
+
"<|video_pad|>"
|
| 228 |
+
],
|
| 229 |
+
"bos_token": null,
|
| 230 |
+
"clean_up_tokenization_spaces": false,
|
| 231 |
+
"eos_token": "<|im_end|>",
|
| 232 |
+
"errors": "replace",
|
| 233 |
+
"extra_special_tokens": {},
|
| 234 |
+
"model_max_length": 131072,
|
| 235 |
+
"pad_token": "<|endoftext|>",
|
| 236 |
+
"split_special_tokens": false,
|
| 237 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 238 |
+
"unk_token": null
|
| 239 |
+
}
|
train_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"total_flos": 1.06313819966443e+17,
|
| 4 |
+
"train_loss": 0.22251781229526407,
|
| 5 |
+
"train_runtime": 4069.8044,
|
| 6 |
+
"train_samples_per_second": 36.857,
|
| 7 |
+
"train_steps_per_second": 1.152
|
| 8 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|