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

Model: hlyn/prompt-injection-judge-3b
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-04-11 05:28:57 +08:00
commit e797f6f31e
36 changed files with 7825 additions and 0 deletions

40
.gitattributes vendored Normal file
View File

@@ -0,0 +1,40 @@
*.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-50/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-63/tokenizer.json filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text
judge-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
judge-dolphin3-3b-f16.gguf filter=lfs diff=lfs merge=lfs -text

81
README.md Normal file
View File

@@ -0,0 +1,81 @@
---
library_name: peft
license: llama3.2
base_model: dphn/Dolphin3.0-Llama3.2-3B
tags:
- axolotl
- base_model:adapter:dphn/Dolphin3.0-Llama3.2-3B
- lora
- dora
- security
- prompt-injection
- transformers
datasets:
- karan11/defender-judge-fine-tune
pipeline_tag: text-generation
---
# Defender Security Judge — Dolphin 3.0 Llama 3.2 3B
A fine-tuned, production-hardened **prompt injection security judge** built on top of [dphn/Dolphin3.0-Llama3.2-3B](https://huggingface.co/dphn/Dolphin3.0-Llama3.2-3B).
This model is Stage 2 of the **Defender** multi-layer LLM security pipeline — a real-time adversarial firewall that intercepts, analyzes, and classifies user prompts before they ever reach a protected LLM.
---
## Benchmark Results
Evaluated against the **[rogue-security/prompt-injections-benchmark](https://huggingface.co/datasets/rogue-security/prompt-injections-benchmark)** — the industry-standard Qualifire benchmark used to evaluate production prompt injection defenses.
| Metric | Score |
|---|---|
| **Accuracy** | **90.00%** |
| **F1 Score** | **0.9038** |
| **Precision** | 88.68% |
| **Recall** | **92.16%** |
> A 3B quantized model running entirely offline achieving 90% accuracy on the hardest curated jailbreak benchmark available. No API calls. No latency. No cost.
---
## What Makes This Model Different
**Zero refusals.** Built on the uncensored Dolphin base, it coldly analyzes any attack — no matter how explicit — without flinching or refusing to process the payload.
**Rigid JSON output.** DoRA fine-tuning permanently hardwires the model to emit only structured `{"decision", "confidence", "reason", "allowed_payload"}` JSON. No preamble. No yapping.
**Calibrated confidence.** Trained with Gaussian confidence noise on ambiguous samples, the model's `confidence` field is mathematically trustworthy — not the overconfident `0.99` you get from vanilla LLMs.
**Long-context immunity.** Trained at `sequence_len: 8192` with 98.37% sample packing efficiency. The model can read an 8,000-token document and catch an attack buried at token 7,500.
---
## Training Details
- **Technique:** DoRA (Weight-Decomposed LoRA) + NEFTune (α=5.0) + Flash Attention + Sample Packing
- **Hardware:** NVIDIA H100 80GB SXM5
- **Training Time:** ~14 minutes
- **Loss:** 2.30 → 0.18 (converged cleanly across 3 epochs)
- **Dataset:** [`karan11/defender-judge-fine-tune`](https://huggingface.co/datasets/karan11/defender-judge-fine-tune) — 2,700 DeBERTa-scored, calibration-hardened samples
---
## Available Artifacts
| File | Description |
|---|---|
| `adapter_model.safetensors` | Raw LoRA adapter weights |
| `judge-dolphin3-3b-f16.gguf` | Full merged model in F16 (6.4 GB) |
| `judge-q4_k_m.gguf` | **Production artifact** — Q4_K_M quantized (2.0 GB) |
---
## Intended Use
This model is **strictly a security classifier**. It is not a general-purpose assistant.
Load it with `llama-cpp-python` and pass it the Defender system prompt for correct behavior.
```python
from llama_cpp import Llama
llm = Llama(model_path="judge-q4_k_m.gguf", n_gpu_layers=-1, n_ctx=8192)

42
adapter_config.json Normal file
View File

@@ -0,0 +1,42 @@
{
"alpha_pattern": {},
"auto_mapping": null,
"base_model_name_or_path": "dphn/Dolphin3.0-Llama3.2-3B",
"bias": "none",
"corda_config": null,
"eva_config": null,
"exclude_modules": null,
"fan_in_fan_out": null,
"inference_mode": true,
"init_lora_weights": true,
"layer_replication": null,
"layers_pattern": null,
"layers_to_transform": null,
"loftq_config": {},
"lora_alpha": 64,
"lora_bias": false,
"lora_dropout": 0.1,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"qalora_group_size": 16,
"r": 32,
"rank_pattern": {},
"revision": null,
"target_modules": [
"q_proj",
"k_proj",
"down_proj",
"v_proj",
"up_proj",
"gate_proj",
"o_proj"
],
"target_parameters": [],
"task_type": "CAUSAL_LM",
"trainable_token_indices": null,
"use_dora": false,
"use_qalora": false,
"use_rslora": false
}

View File

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

54
chat_template.jinja Normal file
View File

@@ -0,0 +1,54 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Dolphin, created by Eric Hartford. You are a helpful assistant.' }}
{%- endif %}
{{- "\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>" }}
{%- 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' }}
{%- else %}
{{- '<|im_start|>system\nYou are Dolphin, created by Eric Hartford. You are a helpful assistant.<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.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' }}
{%- endif %}

208
checkpoint-50/README.md Normal file
View File

@@ -0,0 +1,208 @@
---
base_model: dphn/Dolphin3.0-Llama3.2-3B
library_name: peft
pipeline_tag: text-generation
tags:
- axolotl
- base_model:adapter:dphn/Dolphin3.0-Llama3.2-3B
- lora
- transformers
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed]
- **Finetuned from model [optional]:** [More Information Needed]
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
[More Information Needed]
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
### Results
[More Information Needed]
#### Summary
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
[More Information Needed]
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]
## Model Card Authors [optional]
[More Information Needed]
## Model Card Contact
[More Information Needed]
### Framework versions
- PEFT 0.17.1

View File

@@ -0,0 +1,42 @@
{
"alpha_pattern": {},
"auto_mapping": null,
"base_model_name_or_path": "dphn/Dolphin3.0-Llama3.2-3B",
"bias": "none",
"corda_config": null,
"eva_config": null,
"exclude_modules": null,
"fan_in_fan_out": null,
"inference_mode": true,
"init_lora_weights": true,
"layer_replication": null,
"layers_pattern": null,
"layers_to_transform": null,
"loftq_config": {},
"lora_alpha": 64,
"lora_bias": false,
"lora_dropout": 0.1,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"qalora_group_size": 16,
"r": 32,
"rank_pattern": {},
"revision": null,
"target_modules": [
"q_proj",
"k_proj",
"down_proj",
"v_proj",
"up_proj",
"gate_proj",
"o_proj"
],
"target_parameters": [],
"task_type": "CAUSAL_LM",
"trainable_token_indices": null,
"use_dora": false,
"use_qalora": false,
"use_rslora": false
}

View File

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

View File

@@ -0,0 +1,54 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Dolphin, created by Eric Hartford. You are a helpful assistant.' }}
{%- endif %}
{{- "\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>" }}
{%- 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' }}
{%- else %}
{{- '<|im_start|>system\nYou are Dolphin, created by Eric Hartford. You are a helpful assistant.<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.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' }}
{%- endif %}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,23 @@
{
"bos_token": {
"content": "<|begin_of_text|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|end_of_text|>",
"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:cca43616769fed4807470fb41ccf7f5eebdd08624e7b9adafc09d99332cf31eb
size 17210297

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,144 @@
{
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 2.2823529411764705,
"eval_steps": 500,
"global_step": 50,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.23529411764705882,
"grad_norm": 1.6521763801574707,
"learning_rate": 9.999999999999999e-05,
"loss": 2.3013,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 5,
"tokens_per_second_per_gpu": 718.74
},
{
"epoch": 0.47058823529411764,
"grad_norm": 1.0924193859100342,
"learning_rate": 0.00014897709775520417,
"loss": 1.3236,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 10,
"tokens_per_second_per_gpu": 731.56
},
{
"epoch": 0.7058823529411765,
"grad_norm": 0.6611356735229492,
"learning_rate": 0.00014282678705231832,
"loss": 0.5684,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 15,
"tokens_per_second_per_gpu": 722.65
},
{
"epoch": 0.9411764705882353,
"grad_norm": 0.6052656173706055,
"learning_rate": 0.00013155799573326722,
"loss": 0.3071,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 20,
"tokens_per_second_per_gpu": 728.39
},
{
"epoch": 1.1411764705882352,
"grad_norm": 0.5231208801269531,
"learning_rate": 0.00011602111185918203,
"loss": 0.2304,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 25,
"tokens_per_second_per_gpu": 625.16
},
{
"epoch": 1.3764705882352941,
"grad_norm": 0.34258556365966797,
"learning_rate": 9.738861082512709e-05,
"loss": 0.2163,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 30,
"tokens_per_second_per_gpu": 724.72
},
{
"epoch": 1.611764705882353,
"grad_norm": 0.3575713038444519,
"learning_rate": 7.706657567761216e-05,
"loss": 0.2039,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 35,
"tokens_per_second_per_gpu": 723.32
},
{
"epoch": 1.8470588235294119,
"grad_norm": 0.4452803134918213,
"learning_rate": 5.658858846444006e-05,
"loss": 0.1938,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 40,
"tokens_per_second_per_gpu": 725.05
},
{
"epoch": 2.0470588235294116,
"grad_norm": 0.2797813415527344,
"learning_rate": 3.750000000000001e-05,
"loss": 0.1849,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 45,
"tokens_per_second_per_gpu": 607.58
},
{
"epoch": 2.2823529411764705,
"grad_norm": 0.36559921503067017,
"learning_rate": 2.1241311512366167e-05,
"loss": 0.1819,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 50,
"tokens_per_second_per_gpu": 730.88
}
],
"logging_steps": 5,
"max_steps": 63,
"num_input_tokens_seen": 0,
"num_train_epochs": 3,
"save_steps": 50,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": false
},
"attributes": {}
}
},
"total_flos": 1.092263463616512e+17,
"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:777cf783ce2107ca224701957ecefd6409bd4496cec7b943c91914b5e4aacc22
size 9809

208
checkpoint-63/README.md Normal file
View File

@@ -0,0 +1,208 @@
---
base_model: dphn/Dolphin3.0-Llama3.2-3B
library_name: peft
pipeline_tag: text-generation
tags:
- axolotl
- base_model:adapter:dphn/Dolphin3.0-Llama3.2-3B
- lora
- transformers
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed]
- **Finetuned from model [optional]:** [More Information Needed]
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
[More Information Needed]
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
### Results
[More Information Needed]
#### Summary
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
[More Information Needed]
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]
## Model Card Authors [optional]
[More Information Needed]
## Model Card Contact
[More Information Needed]
### Framework versions
- PEFT 0.17.1

View File

@@ -0,0 +1,42 @@
{
"alpha_pattern": {},
"auto_mapping": null,
"base_model_name_or_path": "dphn/Dolphin3.0-Llama3.2-3B",
"bias": "none",
"corda_config": null,
"eva_config": null,
"exclude_modules": null,
"fan_in_fan_out": null,
"inference_mode": true,
"init_lora_weights": true,
"layer_replication": null,
"layers_pattern": null,
"layers_to_transform": null,
"loftq_config": {},
"lora_alpha": 64,
"lora_bias": false,
"lora_dropout": 0.1,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"qalora_group_size": 16,
"r": 32,
"rank_pattern": {},
"revision": null,
"target_modules": [
"q_proj",
"k_proj",
"down_proj",
"v_proj",
"up_proj",
"gate_proj",
"o_proj"
],
"target_parameters": [],
"task_type": "CAUSAL_LM",
"trainable_token_indices": null,
"use_dora": false,
"use_qalora": false,
"use_rslora": false
}

View File

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

View File

@@ -0,0 +1,54 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Dolphin, created by Eric Hartford. You are a helpful assistant.' }}
{%- endif %}
{{- "\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>" }}
{%- 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' }}
{%- else %}
{{- '<|im_start|>system\nYou are Dolphin, created by Eric Hartford. You are a helpful assistant.<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.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' }}
{%- endif %}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,23 @@
{
"bos_token": {
"content": "<|begin_of_text|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|end_of_text|>",
"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:cca43616769fed4807470fb41ccf7f5eebdd08624e7b9adafc09d99332cf31eb
size 17210297

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,166 @@
{
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 2.8941176470588235,
"eval_steps": 500,
"global_step": 63,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.23529411764705882,
"grad_norm": 1.6521763801574707,
"learning_rate": 9.999999999999999e-05,
"loss": 2.3013,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 5,
"tokens_per_second_per_gpu": 718.74
},
{
"epoch": 0.47058823529411764,
"grad_norm": 1.0924193859100342,
"learning_rate": 0.00014897709775520417,
"loss": 1.3236,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 10,
"tokens_per_second_per_gpu": 731.56
},
{
"epoch": 0.7058823529411765,
"grad_norm": 0.6611356735229492,
"learning_rate": 0.00014282678705231832,
"loss": 0.5684,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 15,
"tokens_per_second_per_gpu": 722.65
},
{
"epoch": 0.9411764705882353,
"grad_norm": 0.6052656173706055,
"learning_rate": 0.00013155799573326722,
"loss": 0.3071,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 20,
"tokens_per_second_per_gpu": 728.39
},
{
"epoch": 1.1411764705882352,
"grad_norm": 0.5231208801269531,
"learning_rate": 0.00011602111185918203,
"loss": 0.2304,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 25,
"tokens_per_second_per_gpu": 625.16
},
{
"epoch": 1.3764705882352941,
"grad_norm": 0.34258556365966797,
"learning_rate": 9.738861082512709e-05,
"loss": 0.2163,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 30,
"tokens_per_second_per_gpu": 724.72
},
{
"epoch": 1.611764705882353,
"grad_norm": 0.3575713038444519,
"learning_rate": 7.706657567761216e-05,
"loss": 0.2039,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 35,
"tokens_per_second_per_gpu": 723.32
},
{
"epoch": 1.8470588235294119,
"grad_norm": 0.4452803134918213,
"learning_rate": 5.658858846444006e-05,
"loss": 0.1938,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 40,
"tokens_per_second_per_gpu": 725.05
},
{
"epoch": 2.0470588235294116,
"grad_norm": 0.2797813415527344,
"learning_rate": 3.750000000000001e-05,
"loss": 0.1849,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 45,
"tokens_per_second_per_gpu": 607.58
},
{
"epoch": 2.2823529411764705,
"grad_norm": 0.36559921503067017,
"learning_rate": 2.1241311512366167e-05,
"loss": 0.1819,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 50,
"tokens_per_second_per_gpu": 730.88
},
{
"epoch": 2.5176470588235293,
"grad_norm": 0.2546774744987488,
"learning_rate": 9.039468659513327e-06,
"loss": 0.1818,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 55,
"tokens_per_second_per_gpu": 729.82
},
{
"epoch": 2.7529411764705882,
"grad_norm": 0.27984631061553955,
"learning_rate": 1.8152713029423283e-06,
"loss": 0.1846,
"memory/device_reserved (GiB)": 66.98,
"memory/max_active (GiB)": 57.73,
"memory/max_allocated (GiB)": 57.73,
"step": 60,
"tokens_per_second_per_gpu": 723.26
}
],
"logging_steps": 5,
"max_steps": 63,
"num_input_tokens_seen": 0,
"num_train_epochs": 3,
"save_steps": 50,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": true
},
"attributes": {}
}
},
"total_flos": 1.3854128835290726e+17,
"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:777cf783ce2107ca224701957ecefd6409bd4496cec7b943c91914b5e4aacc22
size 9809

50
config.json Normal file
View File

@@ -0,0 +1,50 @@
{
"architectures": [
"LlamaForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 128000,
"dtype": "bfloat16",
"eos_token_id": 128256,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 3072,
"initializer_range": 0.02,
"intermediate_size": 8192,
"max_position_embeddings": 131072,
"mlp_bias": false,
"model_type": "llama",
"num_attention_heads": 24,
"num_hidden_layers": 28,
"num_key_value_heads": 8,
"pretraining_tp": 1,
"quantization_config": {
"_load_in_4bit": false,
"_load_in_8bit": true,
"bnb_4bit_compute_dtype": "float32",
"bnb_4bit_quant_storage": "uint8",
"bnb_4bit_quant_type": "fp4",
"bnb_4bit_use_double_quant": false,
"llm_int8_enable_fp32_cpu_offload": false,
"llm_int8_has_fp16_weight": false,
"llm_int8_skip_modules": null,
"llm_int8_threshold": 6.0,
"load_in_4bit": false,
"load_in_8bit": true,
"quant_method": "bitsandbytes"
},
"rms_norm_eps": 1e-05,
"rope_scaling": {
"factor": 32.0,
"high_freq_factor": 4.0,
"low_freq_factor": 1.0,
"original_max_position_embeddings": 8192,
"rope_type": "llama3"
},
"rope_theta": 500000.0,
"tie_word_embeddings": true,
"transformers_version": "4.57.0",
"use_cache": false,
"vocab_size": 128258
}

286
debug.log Normal file

File diff suppressed because one or more lines are too long

View File

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

3
judge-q4_k_m.gguf Normal file
View File

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

23
special_tokens_map.json Normal file
View File

@@ -0,0 +1,23 @@
{
"bos_token": {
"content": "<|begin_of_text|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|end_of_text|>",
"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:cca43616769fed4807470fb41ccf7f5eebdd08624e7b9adafc09d99332cf31eb
size 17210297

2079
tokenizer_config.json Normal file

File diff suppressed because it is too large Load Diff