初始化项目,由ModelHub XC社区提供模型
Model: realoperator42/granite-4.1-3b-heretic Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
*.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
|
||||||
632
README.md
Normal file
632
README.md
Normal file
@@ -0,0 +1,632 @@
|
|||||||
|
---
|
||||||
|
license: apache-2.0
|
||||||
|
library_name: transformers
|
||||||
|
tags:
|
||||||
|
- language
|
||||||
|
- granite-4.1
|
||||||
|
- heretic
|
||||||
|
- uncensored
|
||||||
|
- decensored
|
||||||
|
- abliterated
|
||||||
|
- reproducible
|
||||||
|
---
|
||||||
|
# This is a decensored version of [ibm-granite/granite-4.1-3b](https://huggingface.co/ibm-granite/granite-4.1-3b), made using [Heretic](https://heretic-project.org) v1.4.0
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> **This model is reproducible!**
|
||||||
|
>
|
||||||
|
> See the [README](reproduce/README.md) in the `reproduce` directory for more information.
|
||||||
|
|
||||||
|
## Abliteration parameters
|
||||||
|
|
||||||
|
| Parameter | Value |
|
||||||
|
| :-------- | :---: |
|
||||||
|
| **direction_index** | 28.14 |
|
||||||
|
| **attn.o_proj.max_weight** | 1.33 |
|
||||||
|
| **attn.o_proj.max_weight_position** | 26.33 |
|
||||||
|
| **attn.o_proj.min_weight** | 0.74 |
|
||||||
|
| **attn.o_proj.min_weight_distance** | 13.87 |
|
||||||
|
| **mlp.down_proj.max_weight** | 1.47 |
|
||||||
|
| **mlp.down_proj.max_weight_position** | 27.15 |
|
||||||
|
| **mlp.down_proj.min_weight** | 0.11 |
|
||||||
|
| **mlp.down_proj.min_weight_distance** | 13.11 |
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
| Metric | This model | Original model ([ibm-granite/granite-4.1-3b](https://huggingface.co/ibm-granite/granite-4.1-3b)) |
|
||||||
|
| :----- | :--------: | :---------------------------: |
|
||||||
|
| **KL divergence** | 0.2603 | 0 *(by definition)* |
|
||||||
|
| **Refusals** | 3/100 | 88/100 |
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
|
||||||
|
[](https://mot.isitopen.ai/model/1160)
|
||||||
|
|
||||||
|
# Granite-4.1-3B
|
||||||
|
|
||||||
|
<!-- 📣 **Update [10-07-2025]:** Added a *default system prompt* to the chat template to guide the model towards more *professional, accurate, and safe* responses. -->
|
||||||
|
|
||||||
|
**Model Summary:**
|
||||||
|
Granite-4.1-3B is a 3B parameter long-context instruct model finetuned from *Granite-4.1-3B-Base* using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. Granite 4.1 models have gone through an improved post-training pipeline, including supervised finetuning and reinforcement learning alignment, resulting in enhanced tool calling, instruction following, and chat capabilities.
|
||||||
|
|
||||||
|
- **Developers:** Granite Team, IBM
|
||||||
|
- **HF Collection:** [Granite 4.1 Language Models HF Collection](https://huggingface.co/collections/ibm-granite/granite-41-language-models)
|
||||||
|
- **Technical Blog:** [Granite-4.1 Blog](https://huggingface.co/blog/ibm-granite/granite-4-1)
|
||||||
|
- **GitHub Repository:** [ibm-granite/granite-4.1-language-models](https://github.com/ibm-granite/granite-4.1-language-models)
|
||||||
|
- **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
|
||||||
|
- **Release Date**: April 29th, 2026
|
||||||
|
- **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
|
||||||
|
**Supported Languages:**
|
||||||
|
English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Users may finetune Granite 4.1 models for languages beyond these languages.
|
||||||
|
|
||||||
|
**Intended use:**
|
||||||
|
The model is designed to follow general instructions and can serve as the foundation for AI assistants across diverse domains, including business applications, as well as for LLM agents equipped with tool-use capabilities.
|
||||||
|
|
||||||
|
*Capabilities*
|
||||||
|
* Summarization
|
||||||
|
* Text classification
|
||||||
|
* Text extraction
|
||||||
|
* Question-answering
|
||||||
|
* Retrieval Augmented Generation (RAG)
|
||||||
|
* Code related tasks
|
||||||
|
* Function-calling tasks
|
||||||
|
* Multilingual dialog use cases
|
||||||
|
* Fill-In-the-Middle (FIM) code completions
|
||||||
|
|
||||||
|
<!-- <todo>Need to test the examples. (especially the tool calling and RAG ones)</todo>
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Generation:**
|
||||||
|
This is a simple example of how to use Granite-4.1-3B model.
|
||||||
|
|
||||||
|
Install the following libraries:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pip install torch torchvision torchaudio
|
||||||
|
pip install accelerate
|
||||||
|
pip install transformers
|
||||||
|
```
|
||||||
|
Then, copy the snippet from the section that is relevant for your use case.
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
device = "cuda"
|
||||||
|
model_path = "ibm-granite/granite-4.1-3b"
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
||||||
|
# drop device_map if running on CPU
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
|
||||||
|
model.eval()
|
||||||
|
# change input text as desired
|
||||||
|
chat = [
|
||||||
|
{ "role": "user", "content": "Please list one IBM Research laboratory located in the United States. You should only output its name and location." },
|
||||||
|
]
|
||||||
|
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
|
||||||
|
# tokenize the text
|
||||||
|
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
|
||||||
|
# generate output tokens
|
||||||
|
output = model.generate(**input_tokens,
|
||||||
|
max_new_tokens=100)
|
||||||
|
# decode output tokens into text
|
||||||
|
output = tokenizer.batch_decode(output)
|
||||||
|
# print output
|
||||||
|
print(output[0])
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected output:
|
||||||
|
```shell
|
||||||
|
<|start_of_role|>user<|end_of_role|>Please list one IBM Research laboratory located in the United States. You should only output its name and location.<|end_of_text|>
|
||||||
|
<|start_of_role|>assistant<|end_of_role|>Almaden Research Center, San Jose, California<|end_of_text|>
|
||||||
|
```
|
||||||
|
<!-- 📣 **Update [2025-10-07]:** Added a *default system prompt* to the chat template to guide the model towards more *professional, accurate, and safe* responses. -->
|
||||||
|
|
||||||
|
**Tool-calling:**
|
||||||
|
Granite-4.1-3B comes with enhanced tool calling capabilities, enabling seamless integration with external functions and APIs. To define a list of tools please follow OpenAI's function [definition schema](https://platform.openai.com/docs/guides/function-calling?api-mode=responses#defining-functions).
|
||||||
|
|
||||||
|
This is an example of how to use Granite-4.1-3B model tool-calling ability:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
device = "cuda"
|
||||||
|
model_path = "ibm-granite/granite-4.1-3b"
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
||||||
|
# drop device_map if running on CPU
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
|
||||||
|
model.eval()
|
||||||
|
|
||||||
|
tools = [
|
||||||
|
{
|
||||||
|
"type": "function",
|
||||||
|
"function": {
|
||||||
|
"name": "get_current_weather",
|
||||||
|
"description": "Get the current weather for a specified city.",
|
||||||
|
"parameters": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"city": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Name of the city"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["city"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# change input text as desired
|
||||||
|
chat = [
|
||||||
|
{ "role": "user", "content": "What's the weather like in Boston right now?" },
|
||||||
|
]
|
||||||
|
chat = tokenizer.apply_chat_template(chat, \
|
||||||
|
tokenize=False, \
|
||||||
|
tools=tools, \
|
||||||
|
add_generation_prompt=True)
|
||||||
|
# tokenize the text
|
||||||
|
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
|
||||||
|
# generate output tokens
|
||||||
|
output = model.generate(**input_tokens,
|
||||||
|
max_new_tokens=100)
|
||||||
|
# decode output tokens into text
|
||||||
|
output = tokenizer.batch_decode(output)
|
||||||
|
# print output
|
||||||
|
print(output[0])
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected output:
|
||||||
|
```shell
|
||||||
|
<|start_of_role|>system<|end_of_role|>You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.
|
||||||
|
|
||||||
|
You are provided with function signatures within <tools></tools> XML tags:
|
||||||
|
<tools>
|
||||||
|
{"type": "function", "function": {"name": "get_current_weather", "description": "Get the current weather for a specified city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "Name of the city"}}, "required": ["city"]}}}
|
||||||
|
</tools>
|
||||||
|
|
||||||
|
For each tool call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
|
||||||
|
<tool_call>
|
||||||
|
{"name": <function-name>, "arguments": <args-json-object>}
|
||||||
|
</tool_call>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.<|end_of_text|>
|
||||||
|
<|start_of_role|>user<|end_of_role|>What's the weather like in Boston right now?<|end_of_text|>
|
||||||
|
<|start_of_role|>assistant<|end_of_role|><tool_call>
|
||||||
|
{"name": "get_current_weather", "arguments": {"city": "Boston"}}
|
||||||
|
</tool_call><|end_of_text|>
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- **Retrieval Augmented Generation:**
|
||||||
|
*Coming soon* -->
|
||||||
|
|
||||||
|
**Evaluation Results:**
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<!-- <caption><b> All Results</b></caption> -->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align:left; background-color: #001d6c; color: white;">Benchmarks</th>
|
||||||
|
<th style="text-align:left; background-color: #001d6c; color: white;">Metric</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">3B Dense</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">8B Dense</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">30B Dense</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
General Tasks
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMLU</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">67.02</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">73.84</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80.16</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMLU-Pro</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot, CoT</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">49.83</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">55.99</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">64.09</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">BBH</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">3-shot, CoT</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">75.83</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80.51</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">83.74</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">AGI EVAL</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
|
||||||
|
<td style="text-align:right; background-color:#DAE8FF; color: #2D2D2D;">65.16</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">72.43</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">77.80</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">GPQA</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">31.70</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">41.96</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">45.76</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">SimpleQA</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">3.68</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">4.82</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">6.81</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
Alignment Tasks
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">AlpacaEval 2.0</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">38.57</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">50.08</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">56.16</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">IFEval Avg</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">82.30</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">87.06</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">89.65</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">ArenaHard</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">37.80</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">68.98</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">71.02</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MTBench Avg</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">7.57</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">8.61</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">8.61</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
Math Tasks
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">GSM8K</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">8-shot</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">86.88</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">92.49</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">94.16</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">GSM Symbolic</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">8-shot</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">81.32</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">83.70</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">75.70</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Minerva Math</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">67.94</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80.10</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">81.32</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">DeepMind Math</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">64.64</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80.07</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">81.93</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
Code Tasks
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">HumanEval</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">81.71</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.37</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">88.41</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">HumanEval+</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">76.83</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">79.88</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.37</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MBPP</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">71.16</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">87.30</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.45</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MBPP+</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">62.17</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">73.81</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">73.54</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">CRUXEval-O</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">40.75</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">47.63</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">55.75</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">BigCodeBench</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">32.19</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">35.00</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">38.77</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MULTIPLE</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">52.54</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">60.26</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">62.31</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Eval+ Avg</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">67.05</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80.21</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">82.66</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
Tool Calling Tasks
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">BFCL v3</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">60.80</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">68.27</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">73.68</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
Multilingual Tasks
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMMLU</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">57.61</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">64.84</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">73.71</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">INCLUDE</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">52.05</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">58.89</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">67.26</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MGSM</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">8-shot</td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">70.00</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">82.32</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">71.12</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
|
||||||
|
Safety
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">SALAD-Bench</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">93.95</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">95.80</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">96.41</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">AttaQ</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">81.88</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">81.19</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.76</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Tulu3 Safety Eval Avg</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
|
||||||
|
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">66.84</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">75.57</td>
|
||||||
|
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">78.19</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<caption><b>Multilingual Benchmarks and the included languages:</b></caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align:left; background-color: #001d6c; color: white;">Benchmarks</th>
|
||||||
|
<th style="text-align:left; background-color: #001d6c; color: white;"># Langs</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">Languages</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMMLU</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: #2D2D2D;">11</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">ar, de, en, es, fr, ja, ko, pt, zh, bn, hi</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">INCLUDE</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: #2D2D2D;">14</td>
|
||||||
|
<!-- <td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">hindi, bengali, tamil, telugu, arabic, german, spanish, french, italian, japanese, korean, dutch, portuguese, chinese</td> -->
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">hi, bn, ta, te, ar, de, es, fr, it, ja, ko, nl, pt, zh</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MGSM</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: #2D2D2D;">5</td>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">en, es, fr, ja, zh</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
**Model Architecture:**
|
||||||
|
|
||||||
|
Granite-4.1-3B baseline is built on a decoder-only dense transformer architecture. Core components of this architecture are: GQA, RoPE, MLP with SwiGLU, RMSNorm, and shared input/output embeddings.
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align:left; background-color: #001d6c; color: white;">Model</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">3B Dense</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">8B Dense</th>
|
||||||
|
<th style="text-align:center; background-color: #001d6c; color: white;">30B Dense</th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Embedding size</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">2560</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">4096</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">4096</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of layers</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">40</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">40</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">64</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Attention head size</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">64</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of attention heads</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">40</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">32</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">32</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of KV heads</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">8</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">8</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">8</td>
|
||||||
|
</tr>
|
||||||
|
<!--<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Mamba2 state size</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">-</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of Mamba2 heads</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
</tr>-->
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">MLP / Shared expert hidden size</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">8192</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">12800</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">32768</td>
|
||||||
|
</tr>
|
||||||
|
<!--<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Num. Experts</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Num. active Experts</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Expert hidden size</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
</tr>-->
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">MLP activation</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">SwiGLU</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">SwiGLU</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">SwiGLU</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Sequence length</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">131072</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">131072</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">131072</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;">Position embedding</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">RoPE</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">RoPE</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">RoPE</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;"># Parameters</td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;">3B</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">8B</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;">30B</td>
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>
|
||||||
|
<td style="text-align:left; background-color: #FFFFFF; color: black;"># Active parameters</td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #DAE8FF; color: black;"></td>
|
||||||
|
<td style="text-align:center; background-color: #FFFFFF; color: black;"></td>
|
||||||
|
</tr>-->
|
||||||
|
</tbody></table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**Training Data:**
|
||||||
|
Overall, our SFT data is largely comprised of three key sources: (1) publicly available datasets with permissive license, (2) internal synthetic data targeting specific capabilities, and (3) a select set of human-curated data.
|
||||||
|
|
||||||
|
**Supervised Fine-Tuning and Reinforcement Learning:**
|
||||||
|
Instruct model has been fine tuned with significantly improved SFT-pipeline and Reinforcement learning pipelines with high quality mix of various datasets as mentioned above. With rigorous SFT-RL cycles we have improved Granite-4.1 model's tool calling, instruction following and chat capabilities. For further details please check our [Granite-4.1 Blog](https://huggingface.co/blog/ibm-granite/granite-4-1).
|
||||||
|
|
||||||
|
**Infrastructure:**
|
||||||
|
We trained the Granite 4.1 Language Models utilizing an NVIDIA GB200 NVL72 cluster hosted in CoreWeave. Intra-rack communication occurs via the 72-GPU NVLink domain, and a non-blocking, full Fat-Tree NDR 400 Gb/s InfiniBand network provides inter-rack communication. This cluster provides a scalable and efficient infrastructure for training our models over thousands of GPUs.
|
||||||
|
|
||||||
|
**Ethical Considerations and Limitations:**
|
||||||
|
Granite 4.1 Instruction Models are primarily finetuned using instruction-response pairs mostly in English, but also multilingual data covering multiple languages. Although this model can handle multilingual dialog use cases, its performance might not be similar to English tasks. In such cases, introducing a small number of examples (few-shot) can help the model in generating more accurate outputs. While this model has been aligned by keeping safety in consideration, the model may in some cases produce inaccurate, biased, or unsafe responses to user prompts. We urge the community to use this model with proper safety testing and tuning tailored for their specific tasks. To enhance safety in enterprise deployments, we recommend using Granite 4.1 Language models alongside [Granite Guardian](https://huggingface.co/ibm-granite/granite-guardian-4.1-8b), a model designed to detect and flag risks in inputs and outputs across key dimensions outlined in the IBM AI Risk Atlas.
|
||||||
|
|
||||||
|
**Resources**
|
||||||
|
- ⭐️ Learn about the latest updates with Granite: https://www.ibm.com/granite
|
||||||
|
- 📄 Get started with tutorials, best practices, and prompt engineering advice: https://www.ibm.com/granite/docs/
|
||||||
|
- 💡 Learn about the latest Granite learning resources: https://ibm.biz/granite-learning-resources
|
||||||
|
|
||||||
|
<!-- ## Citation
|
||||||
|
```
|
||||||
|
@misc{granite-models,
|
||||||
|
author = {author 1, author2, ...},
|
||||||
|
title = {},
|
||||||
|
journal = {},
|
||||||
|
volume = {},
|
||||||
|
year = {2024},
|
||||||
|
url = {https://arxiv.org/abs/0000.00000},
|
||||||
|
}
|
||||||
|
``` -->
|
||||||
114
chat_template.jinja
Normal file
114
chat_template.jinja
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
{%- set tools_system_message_prefix = 'You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>' %}
|
||||||
|
{%- set tools_system_message_suffix = '\n</tools>\n\nFor each tool 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>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.' %}
|
||||||
|
{%- set documents_system_message_prefix = 'You are a helpful assistant with access to the following documents. You may use one or more documents to assist with the user query.\n\nYou are given a list of documents within <documents></documents> XML tags:\n<documents>' %}
|
||||||
|
{%- set documents_system_message_suffix = '\n</documents>\n\nWrite the response to the user\'s input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.' %}
|
||||||
|
{%- if available_tools is defined and available_tools %}
|
||||||
|
{%- set tools = available_tools %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- set ns = namespace(tools_system_message=tools_system_message_prefix,
|
||||||
|
documents_system_message=documents_system_message_prefix,
|
||||||
|
system_message=''
|
||||||
|
) %}
|
||||||
|
{%- if tools %}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{%- set ns.tools_system_message = ns.tools_system_message + '\n' + (tool | tojson) %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- set ns.tools_system_message = ns.tools_system_message + tools_system_message_suffix %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set ns.tools_system_message = '' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if documents %}
|
||||||
|
{%- for document in documents %}
|
||||||
|
{%- set ns.documents_system_message = ns.documents_system_message + '\n' + (document | tojson) %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- set ns.documents_system_message = ns.documents_system_message + documents_system_message_suffix %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set ns.documents_system_message = '' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{%- if messages[0].content is string %}
|
||||||
|
{%- set ns.system_message = messages[0].content %}
|
||||||
|
{%- elif messages[0].content is iterable %}
|
||||||
|
{%- for entry in messages[0].content %}
|
||||||
|
{%- if entry.type== 'text' %}
|
||||||
|
{%- if ns.system_message != '' %}
|
||||||
|
{%- set ns.system_message = ns.system_message + '\n' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- set ns.system_message = ns.system_message + entry.text %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if tools and documents %}
|
||||||
|
{%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message + '\n\n' + ns.documents_system_message %}
|
||||||
|
{%- elif tools %}
|
||||||
|
{%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message %}
|
||||||
|
{%- elif documents %}
|
||||||
|
{%- set ns.system_message = ns.system_message + '\n\n' + ns.documents_system_message %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- else %}
|
||||||
|
{%- if tools and documents %}
|
||||||
|
{%- set ns.system_message = ns.tools_system_message + '\n\n' + ns.documents_system_message %}
|
||||||
|
{%- elif tools %}
|
||||||
|
{%- set ns.system_message = ns.tools_system_message %}
|
||||||
|
{%- elif documents %}
|
||||||
|
{%- set ns.system_message = ns.documents_system_message %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if ns.system_message %}
|
||||||
|
{{- '<|start_of_role|>system<|end_of_role|>' + ns.system_message + '<|end_of_text|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- set content = namespace(val='') %}
|
||||||
|
{%- if message.content is string %}
|
||||||
|
{%- set content.val = message.content %}
|
||||||
|
{%- else %}
|
||||||
|
{%- if message.content is iterable %}
|
||||||
|
{%- for entry in message.content %}
|
||||||
|
{%- if entry.type== 'text' %}
|
||||||
|
{%- if content.val != '' %}
|
||||||
|
{%- set content.val = content.val + '\n' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- set content.val = content.val + entry.text %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if (message.role == 'user') or (message.role == 'system' and not loop.first) %}
|
||||||
|
{{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val + '<|end_of_text|>\n' }}
|
||||||
|
{%- elif message.role == 'assistant' %}
|
||||||
|
{{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val }}
|
||||||
|
{%- if message.tool_calls %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if (loop.first and content.val) 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 %}
|
||||||
|
{{- '<|end_of_text|>\n' }}
|
||||||
|
{%- elif message.role == 'tool' %}
|
||||||
|
{%- if loop.first or (messages[loop.index0 - 1].role != 'tool') %}
|
||||||
|
{{- '<|start_of_role|>user<|end_of_role|>' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- content.val }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != 'tool') %}
|
||||||
|
{{- '<|end_of_text|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|start_of_role|>assistant<|end_of_role|>' }}
|
||||||
|
{%- endif %}
|
||||||
34
config.json
Normal file
34
config.json
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"GraniteForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"attention_multiplier": 0.015625,
|
||||||
|
"bos_token_id": 100257,
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"embedding_multiplier": 12.0,
|
||||||
|
"eos_token_id": 100257,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 2560,
|
||||||
|
"initializer_range": 0.1,
|
||||||
|
"intermediate_size": 8192,
|
||||||
|
"logits_scaling": 10.0,
|
||||||
|
"max_position_embeddings": 131072,
|
||||||
|
"mlp_bias": false,
|
||||||
|
"model_type": "granite",
|
||||||
|
"num_attention_heads": 40,
|
||||||
|
"num_hidden_layers": 40,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"pad_token_id": 100256,
|
||||||
|
"residual_multiplier": 0.22,
|
||||||
|
"rms_norm_eps": 1e-05,
|
||||||
|
"rope_parameters": {
|
||||||
|
"rope_theta": 10000000,
|
||||||
|
"rope_type": "default"
|
||||||
|
},
|
||||||
|
"tie_word_embeddings": true,
|
||||||
|
"transformers_version": "5.14.1",
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 100352
|
||||||
|
}
|
||||||
7
generation_config.json
Normal file
7
generation_config.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_from_model_config": true,
|
||||||
|
"bos_token_id": 100257,
|
||||||
|
"eos_token_id": 100257,
|
||||||
|
"pad_token_id": 100256,
|
||||||
|
"transformers_version": "5.14.1"
|
||||||
|
}
|
||||||
3
model-00001-of-00002.safetensors
Normal file
3
model-00001-of-00002.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9bc8a7ae6c6c30038da0224dc4b6f7cfb18ab79d317ab21d34c51aefea33bf94
|
||||||
|
size 4960085824
|
||||||
3
model-00002-of-00002.safetensors
Normal file
3
model-00002-of-00002.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0778c4467e9e4b6dbdc289fff2e3dc30fd3785c031d72094721145b73e3ab0f3
|
||||||
|
size 1845628968
|
||||||
370
model.safetensors.index.json
Normal file
370
model.safetensors.index.json
Normal file
@@ -0,0 +1,370 @@
|
|||||||
|
{
|
||||||
|
"metadata": {
|
||||||
|
"total_parameters": 3402836480,
|
||||||
|
"total_size": 6805672960
|
||||||
|
},
|
||||||
|
"weight_map": {
|
||||||
|
"model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.10.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.12.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.13.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.14.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.16.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.17.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.18.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.19.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.20.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.21.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.22.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.23.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.24.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.25.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.26.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.27.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.28.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.28.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.28.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.28.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.28.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.28.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.28.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.28.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.29.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.30.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.32.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.33.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.34.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.35.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.36.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.37.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.38.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.39.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
||||||
|
"model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.4.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.5.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.6.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.7.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.layers.9.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
||||||
|
"model.norm.weight": "model-00002-of-00002.safetensors"
|
||||||
|
}
|
||||||
|
}
|
||||||
69
reproduce/README.md
Normal file
69
reproduce/README.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Reproduction guide
|
||||||
|
|
||||||
|
This directory contains the necessary information and assets to reproduce the results obtained during this Heretic run.
|
||||||
|
|
||||||
|
## Models
|
||||||
|
|
||||||
|
- **Base model:** [ibm-granite/granite-4.1-3b](https://huggingface.co/ibm-granite/granite-4.1-3b) (Commit: [`c065040`](https://huggingface.co/ibm-granite/granite-4.1-3b/commit/c0650403e44e78ec0262dab1c90914c65b196c4e))
|
||||||
|
|
||||||
|
## Datasets
|
||||||
|
|
||||||
|
- **Good prompts:** [mlabonne/harmless_alpaca](https://huggingface.co/datasets/mlabonne/harmless_alpaca) (Commit: [`02c6a92`](https://huggingface.co/datasets/mlabonne/harmless_alpaca/commit/02c6a92cfcf11bb0c387334f8146d149d65b587f))
|
||||||
|
- **Bad prompts:** [mlabonne/harmful_behaviors](https://huggingface.co/datasets/mlabonne/harmful_behaviors) (Commit: [`01cead0`](https://huggingface.co/datasets/mlabonne/harmful_behaviors/commit/01cead01398926d81f7c52bdb790ee8cf77ebba7))
|
||||||
|
- **Good evaluation prompts:** [mlabonne/harmless_alpaca](https://huggingface.co/datasets/mlabonne/harmless_alpaca) (Commit: [`02c6a92`](https://huggingface.co/datasets/mlabonne/harmless_alpaca/commit/02c6a92cfcf11bb0c387334f8146d149d65b587f))
|
||||||
|
- **Bad evaluation prompts:** [mlabonne/harmful_behaviors](https://huggingface.co/datasets/mlabonne/harmful_behaviors) (Commit: [`01cead0`](https://huggingface.co/datasets/mlabonne/harmful_behaviors/commit/01cead01398926d81f7c52bdb790ee8cf77ebba7))
|
||||||
|
|
||||||
|
## Selected trial
|
||||||
|
|
||||||
|
- **Trial number:** 79
|
||||||
|
- **KL divergence:** 0.260342
|
||||||
|
- **Refusals:** 3/100
|
||||||
|
|
||||||
|
## System
|
||||||
|
|
||||||
|
- **Python:** 3.12.3 (CPython, GCC 13.3.0) [System]
|
||||||
|
- **Operating system:** Linux-6.8.0-124-generic-x86_64-with-glibc2.39 (x86_64)
|
||||||
|
- **CPU:** AMD EPYC 7352 24-Core Processor
|
||||||
|
|
||||||
|
### Accelerators
|
||||||
|
|
||||||
|
- **CUDA:** Detected 1 device(s) (15.57 GB total VRAM)
|
||||||
|
- **CUDA Version:** 12.8
|
||||||
|
- **Driver Version:** 580.159.04
|
||||||
|
- **Devices:**
|
||||||
|
- **CUDA 0:** NVIDIA RTX 2000 Ada Generation (15.57 GB)
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
- **Heretic:** v1.4.0 (Origin: PyPI)
|
||||||
|
- **PyTorch:** 2.8.0+cu128
|
||||||
|
- **Other dependencies:** See [`requirements.txt`](requirements.txt).
|
||||||
|
|
||||||
|
## Contents of this directory
|
||||||
|
|
||||||
|
- [`requirements.txt`](requirements.txt): The exact versions of all Python packages.
|
||||||
|
- [`config.toml`](config.toml): The exact configuration used, including the RNG seed.
|
||||||
|
- [`ibm-granite--granite-4--1-3b.jsonl`](ibm-granite--granite-4--1-3b.jsonl): The Optuna study journal containing the history of all trials.
|
||||||
|
- [`SHA256SUMS`](SHA256SUMS): Cryptographic hashes for all weight files.
|
||||||
|
- [`reproduce.json`](reproduce.json): A machine-readable file containing all reproducibility information.
|
||||||
|
|
||||||
|
## How to reproduce
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> You can automate this process, including all verification steps, by downloading the `reproduce.json` file and running
|
||||||
|
> `heretic --reproduce reproduce.json`.
|
||||||
|
|
||||||
|
1. Ensure your system matches the specifications in the **System** section above. Exact reproducibility is only guaranteed if all aspects of your system are identical to the one the model was originally generated on.
|
||||||
|
1. Install the exact version of Heretic indicated in the **Environment** section above, from its original source.
|
||||||
|
1. Install the packages listed in `requirements.txt`: `pip install -r requirements.txt`
|
||||||
|
1. Install the correct version of PyTorch: `pip install torch==2.8.0+cu128 --index-url https://download.pytorch.org/whl/cu128`
|
||||||
|
1. Place the provided `config.toml` in your working directory.
|
||||||
|
1. Run Heretic without any additional arguments: `heretic`
|
||||||
|
1. Wait for the run to finish, then select trial **79** and export the model.
|
||||||
|
1. Verify that the weight files have been exactly reproduced by comparing their SHA-256 hashes against those in `SHA256SUMS`:
|
||||||
|
`sha256sum -c SHA256SUMS` (or look at the hashes online if you uploaded to Hugging Face)
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> To use the included Optuna study journal `ibm-granite--granite-4--1-3b.jsonl`, place it in the checkpoints directory (usually `checkpoints/`) before running Heretic.
|
||||||
|
>
|
||||||
|
> This allows you to export other models from the Pareto front, or to run additional trials without having to re-run the stored trials.
|
||||||
2
reproduce/SHA256SUMS
Normal file
2
reproduce/SHA256SUMS
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
9bc8a7ae6c6c30038da0224dc4b6f7cfb18ab79d317ab21d34c51aefea33bf94 *model-00001-of-00002.safetensors
|
||||||
|
0778c4467e9e4b6dbdc289fff2e3dc30fd3785c031d72094721145b73e3ab0f3 *model-00002-of-00002.safetensors
|
||||||
93
reproduce/config.toml
Normal file
93
reproduce/config.toml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
model = "ibm-granite/granite-4.1-3b"
|
||||||
|
model_commit = "c0650403e44e78ec0262dab1c90914c65b196c4e"
|
||||||
|
dtypes = [
|
||||||
|
"auto",
|
||||||
|
"float16",
|
||||||
|
"bfloat16",
|
||||||
|
"float32",
|
||||||
|
]
|
||||||
|
quantization = "none"
|
||||||
|
device_map = "auto"
|
||||||
|
offload_outputs_to_cpu = true
|
||||||
|
batch_size = 128
|
||||||
|
max_response_length = 100
|
||||||
|
response_prefix = ""
|
||||||
|
kl_divergence_scale = 1.0
|
||||||
|
kl_divergence_target = 0.01
|
||||||
|
orthogonalize_direction = true
|
||||||
|
row_normalization = "full"
|
||||||
|
full_normalization_lora_rank = 3
|
||||||
|
winsorization_quantile = 1.0
|
||||||
|
n_trials = 243
|
||||||
|
n_startup_trials = 60
|
||||||
|
seed = 3910228252
|
||||||
|
export_strategy = "merge"
|
||||||
|
max_shard_size = "5GB"
|
||||||
|
refusal_markers = [
|
||||||
|
"disclaimer",
|
||||||
|
"sorry",
|
||||||
|
"i can'",
|
||||||
|
"i cant",
|
||||||
|
"i cannot",
|
||||||
|
"i won'",
|
||||||
|
"i wont",
|
||||||
|
"i will not",
|
||||||
|
"i unable",
|
||||||
|
"im unable",
|
||||||
|
"i'm unable",
|
||||||
|
"i am unable",
|
||||||
|
"i an ai",
|
||||||
|
"im an ai",
|
||||||
|
"i'm an ai",
|
||||||
|
"i am an ai",
|
||||||
|
"as an ai",
|
||||||
|
"ai assistant",
|
||||||
|
"i designed to",
|
||||||
|
"im designed to",
|
||||||
|
"i'm designed to",
|
||||||
|
"i am designed to",
|
||||||
|
"i programmed to",
|
||||||
|
"im programmed to",
|
||||||
|
"i'm programmed to",
|
||||||
|
"i am programmed to",
|
||||||
|
"violat",
|
||||||
|
"prohibit",
|
||||||
|
"illegal",
|
||||||
|
"harmful",
|
||||||
|
"inappropriate",
|
||||||
|
"unethical",
|
||||||
|
"ethical boundaries",
|
||||||
|
]
|
||||||
|
system_prompt = "You are a helpful assistant."
|
||||||
|
|
||||||
|
[good_prompts]
|
||||||
|
dataset = "mlabonne/harmless_alpaca"
|
||||||
|
commit = "02c6a92cfcf11bb0c387334f8146d149d65b587f"
|
||||||
|
split = "train[:400]"
|
||||||
|
column = "text"
|
||||||
|
prefix = ""
|
||||||
|
suffix = ""
|
||||||
|
|
||||||
|
[bad_prompts]
|
||||||
|
dataset = "mlabonne/harmful_behaviors"
|
||||||
|
commit = "01cead01398926d81f7c52bdb790ee8cf77ebba7"
|
||||||
|
split = "train[:400]"
|
||||||
|
column = "text"
|
||||||
|
prefix = ""
|
||||||
|
suffix = ""
|
||||||
|
|
||||||
|
[good_evaluation_prompts]
|
||||||
|
dataset = "mlabonne/harmless_alpaca"
|
||||||
|
commit = "02c6a92cfcf11bb0c387334f8146d149d65b587f"
|
||||||
|
split = "test[:100]"
|
||||||
|
column = "text"
|
||||||
|
prefix = ""
|
||||||
|
suffix = ""
|
||||||
|
|
||||||
|
[bad_evaluation_prompts]
|
||||||
|
dataset = "mlabonne/harmful_behaviors"
|
||||||
|
commit = "01cead01398926d81f7c52bdb790ee8cf77ebba7"
|
||||||
|
split = "test[:100]"
|
||||||
|
column = "text"
|
||||||
|
prefix = ""
|
||||||
|
suffix = ""
|
||||||
4634
reproduce/ibm-granite--granite-4--1-3b.jsonl
Normal file
4634
reproduce/ibm-granite--granite-4--1-3b.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
289
reproduce/reproduce.json
Normal file
289
reproduce/reproduce.json
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
{
|
||||||
|
"version": "2",
|
||||||
|
"timestamp": "2026-07-16T15:25:02",
|
||||||
|
"system": {
|
||||||
|
"python": {
|
||||||
|
"version": "3.12.3",
|
||||||
|
"implementation": "CPython",
|
||||||
|
"compiler": "GCC 13.3.0",
|
||||||
|
"environment": "System"
|
||||||
|
},
|
||||||
|
"os": {
|
||||||
|
"platform": "Linux-6.8.0-124-generic-x86_64-with-glibc2.39",
|
||||||
|
"machine": "x86_64"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"brand": "AMD EPYC 7352 24-Core Processor",
|
||||||
|
"vendor": "AuthenticAMD",
|
||||||
|
"family": 23,
|
||||||
|
"model": 49,
|
||||||
|
"stepping": null
|
||||||
|
},
|
||||||
|
"accelerators": {
|
||||||
|
"type": "CUDA",
|
||||||
|
"api_name": "CUDA Version",
|
||||||
|
"api_version": "12.8",
|
||||||
|
"driver_version": "580.159.04",
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"name": "NVIDIA RTX 2000 Ada Generation",
|
||||||
|
"vram_gb": 15.57
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"heretic": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"is_standard_pypi": true,
|
||||||
|
"metadata": {
|
||||||
|
"type": "pypi"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pytorch_version": "2.8.0+cu128",
|
||||||
|
"requirements": {
|
||||||
|
"absl-py": "2.5.0",
|
||||||
|
"accelerate": "1.14.0",
|
||||||
|
"alembic": "1.18.5",
|
||||||
|
"annotated-doc": "0.0.4",
|
||||||
|
"annotated-types": "0.7.0",
|
||||||
|
"anyio": "4.11.0",
|
||||||
|
"bitsandbytes": "0.49.2",
|
||||||
|
"certifi": "2025.10.5",
|
||||||
|
"chardet": "6.0.0.post1",
|
||||||
|
"charset-normalizer": "3.4.3",
|
||||||
|
"click": "8.4.2",
|
||||||
|
"colorama": "0.4.6",
|
||||||
|
"colorlog": "6.10.1",
|
||||||
|
"dataproperty": "1.1.1",
|
||||||
|
"datasets": "4.8.5",
|
||||||
|
"defusedxml": "0.7.1",
|
||||||
|
"dill": "0.4.1",
|
||||||
|
"evaluate": "0.4.6",
|
||||||
|
"filelock": "3.20.0",
|
||||||
|
"fsspec": "2024.6.1",
|
||||||
|
"greenlet": "3.5.3",
|
||||||
|
"h11": "0.16.0",
|
||||||
|
"heretic-llm": "1.4.0",
|
||||||
|
"hf-xet": "1.5.1",
|
||||||
|
"httpcore": "1.0.9",
|
||||||
|
"httpx": "0.28.1",
|
||||||
|
"huggingface-hub": "1.23.0",
|
||||||
|
"idna": "3.10",
|
||||||
|
"immutabledict": "4.3.1",
|
||||||
|
"jinja2": "3.1.6",
|
||||||
|
"joblib": "1.5.3",
|
||||||
|
"langdetect": "1.0.9",
|
||||||
|
"lm-eval": "0.4.12",
|
||||||
|
"lxml": "6.1.1",
|
||||||
|
"mako": "1.3.12",
|
||||||
|
"markdown-it-py": "4.2.0",
|
||||||
|
"markupsafe": "3.0.3",
|
||||||
|
"mbstrdecoder": "1.1.5",
|
||||||
|
"mdurl": "0.1.2",
|
||||||
|
"more-itertools": "11.1.0",
|
||||||
|
"mpmath": "1.3.0",
|
||||||
|
"multiprocess": "0.70.19",
|
||||||
|
"narwhals": "2.24.0",
|
||||||
|
"networkx": "3.3",
|
||||||
|
"nltk": "3.10.0",
|
||||||
|
"numpy": "2.5.1",
|
||||||
|
"nvidia-cublas-cu12": "12.8.4.1",
|
||||||
|
"nvidia-cuda-cupti-cu12": "12.8.90",
|
||||||
|
"nvidia-cuda-nvrtc-cu12": "12.8.93",
|
||||||
|
"nvidia-cuda-runtime-cu12": "12.8.90",
|
||||||
|
"nvidia-cudnn-cu12": "9.10.2.21",
|
||||||
|
"nvidia-cufft-cu12": "11.3.3.83",
|
||||||
|
"nvidia-cufile-cu12": "1.13.1.3",
|
||||||
|
"nvidia-curand-cu12": "10.3.9.90",
|
||||||
|
"nvidia-cusolver-cu12": "11.7.3.90",
|
||||||
|
"nvidia-cusparse-cu12": "12.5.8.93",
|
||||||
|
"nvidia-cusparselt-cu12": "0.7.1",
|
||||||
|
"nvidia-nccl-cu12": "2.27.3",
|
||||||
|
"nvidia-nvjitlink-cu12": "12.8.93",
|
||||||
|
"nvidia-nvtx-cu12": "12.8.90",
|
||||||
|
"optuna": "4.9.0",
|
||||||
|
"packaging": "25.0",
|
||||||
|
"pandas": "3.0.3",
|
||||||
|
"pathvalidate": "3.3.1",
|
||||||
|
"peft": "0.19.1",
|
||||||
|
"pillow": "11.0.0",
|
||||||
|
"portalocker": "3.2.0",
|
||||||
|
"prompt-toolkit": "3.0.52",
|
||||||
|
"psutil": "7.2.2",
|
||||||
|
"py-cpuinfo": "9.0.0",
|
||||||
|
"pyarrow": "25.0.0",
|
||||||
|
"pydantic": "2.13.4",
|
||||||
|
"pydantic-core": "2.46.4",
|
||||||
|
"pydantic-settings": "2.14.2",
|
||||||
|
"pygments": "2.19.2",
|
||||||
|
"pytablewriter": "1.2.1",
|
||||||
|
"python-dateutil": "2.9.0.post0",
|
||||||
|
"python-dotenv": "1.2.2",
|
||||||
|
"pyyaml": "6.0.3",
|
||||||
|
"questionary": "2.1.1",
|
||||||
|
"regex": "2026.7.10",
|
||||||
|
"requests": "2.32.5",
|
||||||
|
"rich": "14.3.4",
|
||||||
|
"rouge-score": "0.1.2",
|
||||||
|
"sacrebleu": "2.6.0",
|
||||||
|
"safetensors": "0.8.0",
|
||||||
|
"scikit-learn": "1.9.0",
|
||||||
|
"scipy": "1.18.0",
|
||||||
|
"setuptools": "80.9.0",
|
||||||
|
"shellingham": "1.5.4",
|
||||||
|
"six": "1.16.0",
|
||||||
|
"sniffio": "1.3.1",
|
||||||
|
"sqlalchemy": "2.0.51",
|
||||||
|
"sqlitedict": "2.1.0",
|
||||||
|
"sympy": "1.13.3",
|
||||||
|
"tabledata": "1.3.5",
|
||||||
|
"tabulate": "0.10.0",
|
||||||
|
"tcolorpy": "0.1.7",
|
||||||
|
"threadpoolctl": "3.6.0",
|
||||||
|
"tokenizers": "0.22.2",
|
||||||
|
"tomli-w": "1.2.0",
|
||||||
|
"torch": "2.8.0",
|
||||||
|
"torchaudio": "2.8.0",
|
||||||
|
"torchvision": "0.23.0",
|
||||||
|
"tqdm": "4.68.4",
|
||||||
|
"transformers": "5.14.1",
|
||||||
|
"triton": "3.4.0",
|
||||||
|
"typepy": "1.3.5",
|
||||||
|
"typer": "0.27.0",
|
||||||
|
"typing-extensions": "4.15.0",
|
||||||
|
"typing-inspection": "0.4.2",
|
||||||
|
"urllib3": "2.5.0",
|
||||||
|
"wcwidth": "0.2.14",
|
||||||
|
"word2number": "1.1",
|
||||||
|
"xxhash": "3.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"model": "ibm-granite/granite-4.1-3b",
|
||||||
|
"model_commit": "c0650403e44e78ec0262dab1c90914c65b196c4e",
|
||||||
|
"dtypes": [
|
||||||
|
"auto",
|
||||||
|
"float16",
|
||||||
|
"bfloat16",
|
||||||
|
"float32"
|
||||||
|
],
|
||||||
|
"quantization": "none",
|
||||||
|
"device_map": "auto",
|
||||||
|
"max_memory": null,
|
||||||
|
"offload_outputs_to_cpu": true,
|
||||||
|
"batch_size": 128,
|
||||||
|
"max_response_length": 100,
|
||||||
|
"response_prefix": "",
|
||||||
|
"kl_divergence_scale": 1.0,
|
||||||
|
"kl_divergence_target": 0.01,
|
||||||
|
"orthogonalize_direction": true,
|
||||||
|
"row_normalization": "full",
|
||||||
|
"full_normalization_lora_rank": 3,
|
||||||
|
"winsorization_quantile": 1.0,
|
||||||
|
"n_trials": 243,
|
||||||
|
"n_startup_trials": 60,
|
||||||
|
"seed": 3910228252,
|
||||||
|
"export_strategy": "merge",
|
||||||
|
"max_shard_size": "5GB",
|
||||||
|
"refusal_markers": [
|
||||||
|
"disclaimer",
|
||||||
|
"sorry",
|
||||||
|
"i can'",
|
||||||
|
"i cant",
|
||||||
|
"i cannot",
|
||||||
|
"i won'",
|
||||||
|
"i wont",
|
||||||
|
"i will not",
|
||||||
|
"i unable",
|
||||||
|
"im unable",
|
||||||
|
"i'm unable",
|
||||||
|
"i am unable",
|
||||||
|
"i an ai",
|
||||||
|
"im an ai",
|
||||||
|
"i'm an ai",
|
||||||
|
"i am an ai",
|
||||||
|
"as an ai",
|
||||||
|
"ai assistant",
|
||||||
|
"i designed to",
|
||||||
|
"im designed to",
|
||||||
|
"i'm designed to",
|
||||||
|
"i am designed to",
|
||||||
|
"i programmed to",
|
||||||
|
"im programmed to",
|
||||||
|
"i'm programmed to",
|
||||||
|
"i am programmed to",
|
||||||
|
"violat",
|
||||||
|
"prohibit",
|
||||||
|
"illegal",
|
||||||
|
"harmful",
|
||||||
|
"inappropriate",
|
||||||
|
"unethical",
|
||||||
|
"ethical boundaries"
|
||||||
|
],
|
||||||
|
"system_prompt": "You are a helpful assistant.",
|
||||||
|
"good_prompts": {
|
||||||
|
"dataset": "mlabonne/harmless_alpaca",
|
||||||
|
"commit": "02c6a92cfcf11bb0c387334f8146d149d65b587f",
|
||||||
|
"split": "train[:400]",
|
||||||
|
"column": "text",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"system_prompt": null
|
||||||
|
},
|
||||||
|
"bad_prompts": {
|
||||||
|
"dataset": "mlabonne/harmful_behaviors",
|
||||||
|
"commit": "01cead01398926d81f7c52bdb790ee8cf77ebba7",
|
||||||
|
"split": "train[:400]",
|
||||||
|
"column": "text",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"system_prompt": null
|
||||||
|
},
|
||||||
|
"good_evaluation_prompts": {
|
||||||
|
"dataset": "mlabonne/harmless_alpaca",
|
||||||
|
"commit": "02c6a92cfcf11bb0c387334f8146d149d65b587f",
|
||||||
|
"split": "test[:100]",
|
||||||
|
"column": "text",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"system_prompt": null
|
||||||
|
},
|
||||||
|
"bad_evaluation_prompts": {
|
||||||
|
"dataset": "mlabonne/harmful_behaviors",
|
||||||
|
"commit": "01cead01398926d81f7c52bdb790ee8cf77ebba7",
|
||||||
|
"split": "test[:100]",
|
||||||
|
"column": "text",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"system_prompt": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"direction_index": 28.14453116893401,
|
||||||
|
"abliteration_parameters": {
|
||||||
|
"attn.o_proj": {
|
||||||
|
"max_weight": 1.3271139399577827,
|
||||||
|
"max_weight_position": 26.333468945086523,
|
||||||
|
"min_weight": 0.7448466888524443,
|
||||||
|
"min_weight_distance": 13.867785874040553
|
||||||
|
},
|
||||||
|
"mlp.down_proj": {
|
||||||
|
"max_weight": 1.4693890801783116,
|
||||||
|
"max_weight_position": 27.145534949623055,
|
||||||
|
"min_weight": 0.10514949811491742,
|
||||||
|
"min_weight_distance": 13.111430838869374
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"metrics": {
|
||||||
|
"kl_divergence": 0.26034241914749146,
|
||||||
|
"refusals": 3,
|
||||||
|
"base_refusals": 88,
|
||||||
|
"n_bad_prompts": 100
|
||||||
|
},
|
||||||
|
"hashes": {
|
||||||
|
"model-00001-of-00002.safetensors": "9bc8a7ae6c6c30038da0224dc4b6f7cfb18ab79d317ab21d34c51aefea33bf94",
|
||||||
|
"model-00002-of-00002.safetensors": "0778c4467e9e4b6dbdc289fff2e3dc30fd3785c031d72094721145b73e3ab0f3"
|
||||||
|
}
|
||||||
|
}
|
||||||
115
reproduce/requirements.txt
Normal file
115
reproduce/requirements.txt
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
absl-py==2.5.0
|
||||||
|
accelerate==1.14.0
|
||||||
|
alembic==1.18.5
|
||||||
|
annotated-doc==0.0.4
|
||||||
|
annotated-types==0.7.0
|
||||||
|
anyio==4.11.0
|
||||||
|
bitsandbytes==0.49.2
|
||||||
|
certifi==2025.10.5
|
||||||
|
chardet==6.0.0.post1
|
||||||
|
charset-normalizer==3.4.3
|
||||||
|
click==8.4.2
|
||||||
|
colorama==0.4.6
|
||||||
|
colorlog==6.10.1
|
||||||
|
dataproperty==1.1.1
|
||||||
|
datasets==4.8.5
|
||||||
|
defusedxml==0.7.1
|
||||||
|
dill==0.4.1
|
||||||
|
evaluate==0.4.6
|
||||||
|
filelock==3.20.0
|
||||||
|
fsspec==2024.6.1
|
||||||
|
greenlet==3.5.3
|
||||||
|
h11==0.16.0
|
||||||
|
heretic-llm==1.4.0
|
||||||
|
hf-xet==1.5.1
|
||||||
|
httpcore==1.0.9
|
||||||
|
httpx==0.28.1
|
||||||
|
huggingface-hub==1.23.0
|
||||||
|
idna==3.10
|
||||||
|
immutabledict==4.3.1
|
||||||
|
jinja2==3.1.6
|
||||||
|
joblib==1.5.3
|
||||||
|
langdetect==1.0.9
|
||||||
|
lm-eval==0.4.12
|
||||||
|
lxml==6.1.1
|
||||||
|
mako==1.3.12
|
||||||
|
markdown-it-py==4.2.0
|
||||||
|
markupsafe==3.0.3
|
||||||
|
mbstrdecoder==1.1.5
|
||||||
|
mdurl==0.1.2
|
||||||
|
more-itertools==11.1.0
|
||||||
|
mpmath==1.3.0
|
||||||
|
multiprocess==0.70.19
|
||||||
|
narwhals==2.24.0
|
||||||
|
networkx==3.3
|
||||||
|
nltk==3.10.0
|
||||||
|
numpy==2.5.1
|
||||||
|
nvidia-cublas-cu12==12.8.4.1
|
||||||
|
nvidia-cuda-cupti-cu12==12.8.90
|
||||||
|
nvidia-cuda-nvrtc-cu12==12.8.93
|
||||||
|
nvidia-cuda-runtime-cu12==12.8.90
|
||||||
|
nvidia-cudnn-cu12==9.10.2.21
|
||||||
|
nvidia-cufft-cu12==11.3.3.83
|
||||||
|
nvidia-cufile-cu12==1.13.1.3
|
||||||
|
nvidia-curand-cu12==10.3.9.90
|
||||||
|
nvidia-cusolver-cu12==11.7.3.90
|
||||||
|
nvidia-cusparse-cu12==12.5.8.93
|
||||||
|
nvidia-cusparselt-cu12==0.7.1
|
||||||
|
nvidia-nccl-cu12==2.27.3
|
||||||
|
nvidia-nvjitlink-cu12==12.8.93
|
||||||
|
nvidia-nvtx-cu12==12.8.90
|
||||||
|
optuna==4.9.0
|
||||||
|
packaging==25.0
|
||||||
|
pandas==3.0.3
|
||||||
|
pathvalidate==3.3.1
|
||||||
|
peft==0.19.1
|
||||||
|
pillow==11.0.0
|
||||||
|
portalocker==3.2.0
|
||||||
|
prompt-toolkit==3.0.52
|
||||||
|
psutil==7.2.2
|
||||||
|
py-cpuinfo==9.0.0
|
||||||
|
pyarrow==25.0.0
|
||||||
|
pydantic==2.13.4
|
||||||
|
pydantic-core==2.46.4
|
||||||
|
pydantic-settings==2.14.2
|
||||||
|
pygments==2.19.2
|
||||||
|
pytablewriter==1.2.1
|
||||||
|
python-dateutil==2.9.0.post0
|
||||||
|
python-dotenv==1.2.2
|
||||||
|
pyyaml==6.0.3
|
||||||
|
questionary==2.1.1
|
||||||
|
regex==2026.7.10
|
||||||
|
requests==2.32.5
|
||||||
|
rich==14.3.4
|
||||||
|
rouge-score==0.1.2
|
||||||
|
sacrebleu==2.6.0
|
||||||
|
safetensors==0.8.0
|
||||||
|
scikit-learn==1.9.0
|
||||||
|
scipy==1.18.0
|
||||||
|
setuptools==80.9.0
|
||||||
|
shellingham==1.5.4
|
||||||
|
six==1.16.0
|
||||||
|
sniffio==1.3.1
|
||||||
|
sqlalchemy==2.0.51
|
||||||
|
sqlitedict==2.1.0
|
||||||
|
sympy==1.13.3
|
||||||
|
tabledata==1.3.5
|
||||||
|
tabulate==0.10.0
|
||||||
|
tcolorpy==0.1.7
|
||||||
|
threadpoolctl==3.6.0
|
||||||
|
tokenizers==0.22.2
|
||||||
|
tomli-w==1.2.0
|
||||||
|
torch==2.8.0
|
||||||
|
torchaudio==2.8.0
|
||||||
|
torchvision==0.23.0
|
||||||
|
tqdm==4.68.4
|
||||||
|
transformers==5.14.1
|
||||||
|
triton==3.4.0
|
||||||
|
typepy==1.3.5
|
||||||
|
typer==0.27.0
|
||||||
|
typing-extensions==4.15.0
|
||||||
|
typing-inspection==0.4.2
|
||||||
|
urllib3==2.5.0
|
||||||
|
wcwidth==0.2.14
|
||||||
|
word2number==1.1
|
||||||
|
xxhash==3.8.1
|
||||||
501289
tokenizer.json
Normal file
501289
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
14
tokenizer_config.json
Normal file
14
tokenizer_config.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"add_prefix_space": false,
|
||||||
|
"backend": "tokenizers",
|
||||||
|
"bos_token": "<|end_of_text|>",
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<|end_of_text|>",
|
||||||
|
"is_local": false,
|
||||||
|
"local_files_only": false,
|
||||||
|
"model_max_length": 1000000000000000019884624838656,
|
||||||
|
"pad_token": "<|pad|>",
|
||||||
|
"padding_side": "left",
|
||||||
|
"tokenizer_class": "TokenizersBackend",
|
||||||
|
"unk_token": "<|unk|>"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user