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

Model: aisingapore/Apertus-SEA-LION-v4-8B-IT
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-08-17 00:47:17 +08:00
commit 23fb9f1bec
16 changed files with 9300 additions and 0 deletions

39
.gitattributes vendored Normal file
View File

@@ -0,0 +1,39 @@
*.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
debug.log filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text
Apertus_SEA-LIONv4.png filter=lfs diff=lfs merge=lfs -text
sea-helm_scores_05_Feb_1pm.png filter=lfs diff=lfs merge=lfs -text

3
Apertus_SEA-LIONv4.png Normal file
View File

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

275
README.md Normal file
View File

@@ -0,0 +1,275 @@
---
library_name: transformers
base_model:
- swiss-ai/Apertus-8B-Instruct-2509
new_version: aisingapore/Qwen-SEA-LION-v4.5-27B-IT
language:
- en
- zh
- vi
- id
- th
- fil
- ta
- ms
- my
license: mit
base_model_relation: finetune
pipeline_tag: text-generation
---
![Banner!](Apertus_SEA-LIONv4.png "v4-banner-Apertus-v4")
# Apertus-SEA-LION-v4-8B-IT
*[Last update: 2026-02-05]*
SEA-LION is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
**Apertus-SEA-LION-v4-8B-IT** is a 8-billion parameter model built upon the Apertus-8B-Instruct architecture. To ensure **domain adaptation** for the region, the model underwent rigorous post-training on a curated dataset of approximately **6.4 million** instruction-text pairs.
This extensive post-training instills **multilingual** and **multicultural** fluency, covering key SEA languages such as Indonesian, Vietnamese, Thai, Filipino, Tamil, Burmese, Malay. This curated dataset also includes a filtered open sourced set of tool-calling instruction-text pairs to impart these capabilities, in addition to linguistic fluency.
Apertus-SEA-LION-v4-8B-IT is designed as a fully open model to align with this core philosophy, we have released the datasets used for post-training, as well as the evaluation codes and datasets used to evaluate the model.
These resources can be accessed via the link below.
- [Open post-training datasets](#Training-Data) we used.
- [SEA-HELM Evaluation codes and datasets](<https://github.com/aisingapore/SEA-HELM>)
## Model Details
### Model Description
SEA-LION stands for *Southeast Asian Languages In One Network*.
We performed Post-Training in English and SEA languages on Apertus-8B-Instruct-2509, a decoder model using the Apertus architecture, to create Apertus-SEA-LION-v4-8B-IT.
For tokenization, the model employs the default tokenizer used in Apertus-8B-Instruct-2509.
- **Developed by:** AI Products Pillar, AI Singapore
- **Funded by:** Singapore NRF
- **Shared by:** AI Products Pillar, AI Singapore
- **Model type:** Decoder
- **Context length:** 65k
- **Language(s):** Indonesian, Vietnamese, Thai, Filipino, Tamil, Burmese, Malay
- **License:** [MIT](https://mit-license.org/)
- **Finetuned from model:** [Apertus-8B-Instruct](https://huggingface.co/swiss-ai/Apertus-8B-Instruct-2509)
### Model Sources
- **Repository:** <https://huggingface.co/collections/aisingapore/sea-lion-v4>
## Uses
### Out-of-Scope Use
The model has not been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
## Bias, Risks, and Limitations
*The model was not tested for robustness against adversarial prompting.* It is important for users to be aware that our model exhibits certain limitations that warrant consideration. Like many LLMs, the model can hallucinate and occasionally generates irrelevant content, introducing fictional elements that are not grounded in the provided context. Users should also exercise caution in interpreting and validating the model's responses due to the potential inconsistencies.
## How to Get Started with the Model
Use the code below to get started with the model with 🤗 Transformers libraries.
```
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "aisingapore/Apertus-SEA-LION-v4-8B-IT"
model = AutoModelForCausalLM.from_pretrained(
model_id, device_map="auto"
).eval()
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [
{
"role": "user",
"content": "Any flats for sale in Tampines?"
}
]
tools = [
{
"type": "function",
"function": {
"name": "search_hdb_listings",
"description": "Search for HDB flats available for sale",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "Town or area name"},
"flat_type": {"type": "string", "description": "Flat type e.g. 3-room, 4-room, 5-room"},
"max_price": {"type": "number", "description": "Maximum price in SGD"}
},
"required": ["location", "flat_type"]
}
}
},
{
"type": "function",
"function": {
"name": "calculate_mortgage",
"description": "Calculate estimated monthly mortgage payment",
"parameters": {
"type": "object",
"properties": {
"loan_amount": {"type": "number", "description": "Loan amount in SGD"},
"interest_rate": {"type": "number", "description": "Annual interest rate as percentage"},
"loan_tenure_years": {"type": "integer", "description": "Loan period in years"}
},
"required": ["loan_amount"]
}
}
}
]
inputs = tokenizer.apply_chat_template(
messages, tools=tools, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
with torch.inference_mode():
generation = model.generate(**inputs, max_new_tokens=512, do_sample=False)
generation = generation[0][input_len:]
decoded = tokenizer.decode(generation, skip_special_tokens=True)
print(decoded)
```
Output:
```
# I'll search for HDB flats available for sale in Tampines. Let me check the listings for you.
# <tool_call>
# {"name": "search_hdb_listings", "arguments": {"location": "Tampines", "flat_type": "3-room", "max_price": 500000}}
# </tool_call>
```
## Vllm Model Serving
```
vllm serve aisingapore/Apertus-SEA-LION-v4-8B-IT --enable-auto-tool-choice --tool-call-parser hermes
```
## Training Details
**Training Datasets**:
The instruction fine-tuning text dataset comprises of a collection of OSS & synthetic data. The datasets used for Post Training can be accessed via the link below.
- 🤗[aisingapore/SEA-Instruct-2602](https://huggingface.co/datasets/aisingapore/SEA-Instruct-2602) (Only for ms, my, ta, fil)
- 🤗[allenai/Dolci-Instruct-SFT](https://huggingface.co/datasets/allenai/Dolci-Instruct-SFT) (Filtered for invalid conversations)
- 🤗[Agent-Ark/Toucan-1.5M](https://huggingface.co/datasets/Agent-Ark/Toucan-1.5M) (SFT Subset)
**Training Regime:** Our Post Training workflow consists of Instruction Fine Tuning and Distillation (from Apertus-70B-Instruct-2509).
## Evaluation
### Testing Data, Factors & Metrics
We evaluated Apertus-SEA-LION-v4-8B-IT on general language capabilities and LLM-specific capabilities using SEA-HELM.
**Testing Data**
General language capabilities
For the evaluation of general language capabilities, we employed the [SEA-HELM evaluation benchmark](https://arxiv.org/abs/2502.14301) across a variety of tasks. These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive Summarisation (Abssum), Causal Reasoning (Causal), Natural Language Inference (NLI), Linguistic Diagnostics (LINDSEA), Cultural Knowledge (Kalahi) and Global MMLU Lite/Thai Exam.
Instruction-following and Multi-turn Chat
We evaluated the models on Instruction-Following and Multi-turn Chat capabilities with SEA-IFEval (based on [IFEval](https://arxiv.org/abs/2311.07911)) and SEA-MTBench (based on [MT-Bench](https://arxiv.org/abs/2306.05685)) respectively. The two datasets were originally in English, the linguists and native speakers in the team worked together to filter, localise and translate the datasets into the respective target languages to ensure that the examples remained reasonable, meaningful and natural.
#### Factors
All evaluations were run with the model specific generation parameters defined in the model config. Each evaluation comprised of 8 runs with different seeds and the final results were averaged across these runs.
For all tasks, the model was expected to provide an answer tag from which the answer was automatically extracted. For tasks where options were provided, the answer should comprise one of the pre-defined options.
The evaluation was done **zero-shot** with native prompts on a sample of 100-1000 instances for each dataset.
SEA-IFEval
SEA-IFEval evaluates a model's ability to adhere to constraints provided in the prompt, for example beginning a response with a specific word/phrase or answering with a certain number of sections. Additionally, accuracy is normalised by the proportion of responses in the correct language (if the model performs the task correctly but responds in the wrong language, it is judged to have failed the task).
SEA-MTBench
SEA-MTBench evaluates a model's ability to engage in Multi-turn (2 turns) conversations and respond in ways that align with human needs. We use `gpt-4.1-2025-04-14` as the judge model and compare against `gpt-4.1-2025-04-14` as the baseline model. The metric used is the weighted win rate against the baseline model (i.e. average win rate across each category: Math, Reasoning, STEM, Humanities, Roleplay, Writing, Extraction).
#### Metrics
The following metrics were used for text capabilities:
| **Task** | **Metric** |
| --- | --- |
| Sentiment Analysis | Accuracy |
| Extractive QA (ID, VI, TH, TA) | ChrF++ |
| MCQ-QA (TL, MY, MS) | Accuracy |
| Metaphor | Accuracy |
| Abstractive Summarisation | Rouge-L |
| Translations | MetricX-24 score (with reference) |
| Causal Reasoning | Accuracy |
| Natural Language Inference | Accuracy |
| LINDSEA | Accuracy |
| Global MMLU Lite | Accuracy |
| Thai Exam | Accuracy |
| Kalahi | Accuracy |
| SEA-IFEval | Accuracy |
| SEA-MTBench | Win rate against a reference |
### Evaluating Apertus-SEA-LION-v4-8B-IT on SEA-HELM
Apertus-SEA-LION-v4-8B-IT can be evaluated by following the steps in: [https://github.com/aisingapore/SEA-HELM/tree/main?tab=readme-ov-file#instructions-for-running-sea-helm](https://github.com/aisingapore/SEA-HELM/tree/seahelm-update?tab=readme-ov-file#instructions-for-running-sea-helm)
### Results
![LeaderboardResults!](sea-helm_scores_05_Feb_1pm.png "LeaderboardCaptured05Feb1pm")
For details on Apertus-SEA-LION-v4-8B-IT performance, please refer to the SEA-HELM leaderboard, <https://leaderboard.sea-lion.ai/> .
### Tool calling
We evaluated the tool calling capabilities of our model using the Berkeley Function Calling Leaderboard (BFCL) V4 evaluation.
#### Factors
The evaluation was done using the codes from the BFCL v4 repository. Modifications were made to the agentic web search task:
- The Brave Search API was used instead of the DuckDuckGo Search API. The Brave Search API is also a privacy focused search engine and is similar to the DuckDuckGo Search API.
**Note:** Apertus-8b was run in prompt mode as it does not support function calling.
#### Results
![ToolcallingResults!](Toolcalling_05_Feb_1pm.png "Toolcalling05Feb1pm")
## Technical Specifications
### Software Environment & Requirements
| Library | Version |
| --- | --- |
| `Transformers` | `4.57.1` |
| `PyTorch` | `2.8.0 + cu129` |
| `Datasets` | `4.4.2` |
| `Tokenizers` | `0.22.1` |
## More Information
This is the repository for the commercial instruction-tuned model. The model has *not* been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
For more info, please contact us at [sealion@aisingapore.org](mailto:sealion@aisingapore.org)
## Team
Ahmed Dabeer, Ahn Jeongmi, Antonyrex Sajeban, Chan Hok Teng Adwin, Cheng Zi Yi Nicholas, Choa Hsueh Mei Esther, Heng Jonathan, Huang Yuli, Jann Railey Estrada Montalan, Lee Chwan Ren, Leong Wai Yi, Leong Wei Qi, Liew Rachel, Limkonchotiwat Peerat, Muhammad Ridzuan Bin Mokhtar, Nagarajan Karthik, Ng Boon Cheong Raymond, Ngee Chia Tai, Ngui Jian Gang, Nguyen Thanh Ngan, Ong Tat-Wee David, Ong Zhi Hao, Pereira Mark, Poon Joseph, Rengarajan Hamsawardhini, Siow Wei Kang Bryan, Susanto Yosephine, Sutaveephamochanon Anocha, Tan Choon Meng, Tan Chor Phin Evelyn, Tan Siao Wei Jessica, Tan Yixian, Tee Jun Yun, Teng Kok Wai Walter, Teo Eng Sipp Leslie, Tjhi William, Wu Donghang, Yeo Yeow Tong, Yong Xianbin, Zhang Zhou, Imanol Schlag (Swiss AI), Antoine Bosselut (Swiss AI) and Martin Jaggi (Swiss AI)
## Acknowledgement
This project is supported by the National Research Foundation Singapore and Infocomm Media Development Authority (IMDA), Singapore under its National Large Language Model Funding Initiative.
## Contact
[sealion@aisingapore.org](mailto:sealion@aisingapore.org)

BIN
Toolcalling_05_Feb_1pm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

406
chat_template.jinja Normal file
View File

@@ -0,0 +1,406 @@
{%- macro render_typescript_type(param_spec, required_params, is_nullable=false) -%}
{%- if param_spec.type == "array" -%}
{%- if param_spec["items"] -%}
{%- if param_spec["items"]["type"] == "string" -%}
{{- "string[]" -}}
{%- elif param_spec["items"]["type"] == "number" -%}
{{- "number[]" -}}
{%- elif param_spec["items"]["type"] == "integer" -%}
{{- "number[]" -}}
{%- elif param_spec["items"]["type"] == "boolean" -%}
{{- "boolean[]" -}}
{%- else -%}
{%- set inner_type = render_typescript_type(param_spec["items"], required_params) -%}
{%- if inner_type == "object | object" or inner_type|length > 50 -%}
{{- "any[]" -}}
{%- else -%}
{{- inner_type ~ "[]" -}}
{%- endif -%}
{%- endif -%}
{%- if param_spec.nullable -%}
{{- " | null" -}}
{%- endif -%}
{%- else -%}
{{- "any[]" -}}
{%- if param_spec.nullable -%}
{{- " | null" -}}
{%- endif -%}
{%- endif -%}
{%- elif param_spec.type is defined
and param_spec.type is iterable
and param_spec.type is not string
and param_spec.type is not mapping
and param_spec.type[0] is defined -%}
{%- if param_spec.type | length > 1 -%}
{{- param_spec.type | join(" | ") -}}
{%- else -%}
{{- param_spec.type[0] -}}
{%- endif -%}
{%- elif param_spec.oneOf is defined -%}
{%- set has_object_variants = false -%}
{%- for variant in param_spec.oneOf -%}
{%- if variant.type == "object" -%}
{%- set has_object_variants = true -%}
{%- endif -%}
{%- endfor -%}
{%- if has_object_variants and param_spec.oneOf|length > 1 -%}
{{- "any" -}}
{%- else -%}
{%- for variant in param_spec.oneOf -%}
{{- render_typescript_type(variant, required_params) -}}
{%- if variant.description is defined -%}
{{- "// " ~ variant.description -}}
{%- endif -%}
{%- if variant.default is defined -%}
{{- "// default: " ~ variant.default|tojson -}}
{%- endif -%}
{%- if not loop.last -%}
{{- " | " -}}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- elif param_spec.type == "string" -%}
{%- if param_spec.enum is defined -%}
{{- '"' ~ param_spec.enum|join('" | "') ~ '"' -}}
{%- else -%}
{{- "string" -}}
{%- if param_spec.nullable is defined and param_spec.nullable -%}
{{- " | null" -}}
{%- endif -%}
{%- endif -%}
{%- elif param_spec.type == "number" -%}
{{- "number" -}}
{%- elif param_spec.type == "integer" -%}
{{- "number" -}}
{%- elif param_spec.type == "boolean" -%}
{{- "boolean" -}}
{%- elif param_spec.type == "object" -%}
{%- if param_spec.properties is defined -%}
{{- "{\n" -}}
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
{{- prop_name -}}
{%- if prop_name not in (param_spec.required or []) -%}
{{- "?" -}}
{%- endif -%}
{{- ": " -}}
{{- render_typescript_type(prop_spec, param_spec.required or []) -}}
{%- if not loop.last -%}
{{- ", " -}}
{%- endif -%}
{%- endfor -%}
{{- "}" -}}
{%- else -%}
{{- "object" -}}
{%- endif -%}
{%- else -%}
{{- "any" -}}
{%- endif -%}
{%- endmacro -%}
{%- macro render_tools(tools) -%}
{%- for tool in tools -%}
{%- set tool_name = tool.name if tool.name is defined else tool.function.name -%}
{%- set tool_desc = tool.description if tool.description is defined else tool.function.description -%}
{%- set tool_params = tool.parameters if tool.parameters is defined else tool.function.parameters -%}
{{- "// " ~ tool_desc ~ "\n" -}}
{{- "type " ~ tool_name ~ " = " -}}
{%- if tool_params is defined and tool_params.properties is defined and tool_params.properties|length > 0 -%}
{{- "(_: {\n" -}}
{%- for param_name, param_spec in tool_params.properties.items() -%}
{%- if param_spec.description is defined -%}
{{- "// " ~ param_spec.description ~ "\n" -}}
{%- endif -%}
{{- param_name -}}
{%- if param_name not in (tool_params.required or []) -%}
{{- "?" -}}
{%- endif -%}
{{- ": " -}}
{{- render_typescript_type(param_spec, tool_params.required or []) -}}
{%- if param_spec.default is defined -%}
{%- if param_spec.enum is defined -%}
{{- ", // default: " ~ param_spec.default -}}
{%- elif param_spec.oneOf is defined -%}
{{- "// default: " ~ param_spec.default -}}
{%- else -%}
{{- ", // default: " ~ param_spec.default|tojson -}}
{%- endif -%}
{%- endif -%}
{%- if not loop.last -%}
{{- ",\n" -}}
{%- else -%}
{{- "\n" -}}
{%- endif -%}
{%- endfor -%}
{{- "}) => any;" -}}
{%- else -%}
{{- "() => any;" -}}
{%- endif -%}
{%- if not loop.last -%}
{{- "\n" -}}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}
{%- macro render_tools_json(tools) -%}
<tools>
{%- for tool in tools -%}
{{- tool | tojson -}}
{{- "\n" -}}
{%- endfor -%}
</tools>
{%- endmacro -%}
{# ============================== preamble / tokens ============================== #}
{{- bos_token -}}
{%- set system_token = "<|system_start|>" -%}
{%- set end_system_token = "<|system_end|>" -%}
{%- set developer_token = "<|developer_start|>" -%}
{%- set end_developer_token = "<|developer_end|>" -%}
{%- set user_token = "<|user_start|>" -%}
{%- set end_user_token = "<|user_end|>" -%}
{%- set assistant_token = "<|assistant_start|>" -%}
{%- set end_assistant_token = "<|assistant_end|>" -%}
{%- set inner_token = "<|inner_prefix|>" -%}
{%- set outer_token = "<|inner_suffix|>" -%}
{%- set image_token = "<|image|>" -%}
{%- set ns = namespace(
in_assistant=false,
in_inner=false,
waiting_for_tool_outputs=false,
assistant_format=none,
has_system=false,
in_tool_group=false
) -%}
{# ============================== system (now also contains tools) ============================== #}
{%- if messages and messages[0].role == "system" -%}
{%- set ns.has_system = true -%}
{%- endif -%}
{%- if ns.has_system or (tools is defined and tools) -%}
{{- system_token -}}
{%- if ns.has_system -%}
{%- if "content" in messages[0] -%}
{%- if messages[0].content is string -%}
{{- messages[0].content -}}
{%- elif messages[0].content is mapping and "text" in messages[0].content -%}
{{- messages[0].content.text -}}
{%- else -%}
{{- raise_exception("Invalid system message") -}}
{%- endif -%}
{%- else -%}
{{- raise_exception("Invalid system message") -}}
{%- endif -%}
{%- endif -%}
{%- if tools is defined and tools -%}
{%- if ns.has_system -%}
{{- "\n\n" -}}
{%- endif -%}
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
{{- render_tools_json(tools) -}}
For each function 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>
{%- endif -%}
{{- end_system_token -}}
{%- endif -%}
{%- set loop_messages = messages[1:] if ns.has_system else messages -%}
{# ============================== optional developer preamble (kept) ============================== #}
{%- if enable_thinking is defined and enable_thinking -%}
{{- developer_token ~ "Deliberation: enabled" ~ end_developer_token -}}
{%- endif -%}
{# ============================== main loop ============================== #}
{%- for message in loop_messages -%}
{# -------- tool messages -> rendered as USER turns with <tool_response> tags -------- #}
{%- if message.role == "tool" -%}
{%- if ns.in_assistant -%}
{{- end_assistant_token -}}
{%- set ns.in_assistant = false -%}
{%- endif -%}
{%- if not ns.in_tool_group -%}
{{- user_token -}}
{%- set ns.in_tool_group = true -%}
{%- endif -%}
<tool_response>
{{- message.content -}}
</tool_response>
{%- set next_is_tool = (not loop.last) and (loop_messages[loop.index0 + 1].role == "tool") -%}
{%- if not next_is_tool -%}
{{- end_user_token -}}
{%- set ns.in_tool_group = false -%}
{%- set ns.waiting_for_tool_outputs = false -%}
{%- endif -%}
{# -------- user messages -------- #}
{%- elif message.role == "user" -%}
{%- set ns.in_inner = false -%}
{%- if ns.in_assistant -%}
{{- end_assistant_token -}}
{%- set ns.in_assistant = false -%}
{%- endif -%}
{{- user_token -}}
{%- if "content" in message -%}
{%- if message.content is string -%}
{{- message.content -}}
{%- elif message.content is mapping and "parts" in message.content -%}
{%- for part in message.content.parts -%}
{%- if part.type == "text" -%}
{{- part.text -}}
{%- elif part.type == "image" -%}
{{- image_token -}}
{%- else -%}
{{- raise_exception("Invalid user part: " ~ part.type) -}}
{%- endif -%}
{%- endfor -%}
{%- else -%}
{{- raise_exception("Invalid user message") -}}
{%- endif -%}
{%- endif -%}
{{- end_user_token -}}
{# -------- assistant messages (emit <tool_call> tags) -------- #}
{%- elif message.role == "assistant" -%}
{%- if not ns.in_assistant -%}
{{- assistant_token -}}
{%- set ns.in_assistant = true -%}
{%- endif -%}
{%- if "content" in message and message.content -%}
{%- if message.content is string and (ns.assistant_format is none or ns.assistant_format == "string") -%}
{%- set ns.assistant_format = "string" -%}
{{- message.content -}}
{%- elif message.content is mapping and "blocks" in message.content and (ns.assistant_format is none or ns.assistant_format == "mapping") -%}
{%- set ns.assistant_format = "mapping" -%}
{%- for block in message.content.blocks -%}
{%- if block.type == "thoughts" -%}
{%- if not ns.in_inner -%}
{%- set ns.in_inner = true -%}
{{- inner_token -}}
{%- endif -%}
{{- block.text -}}
{%- elif block.type == "tool_calls" -%}
{%- if ns.in_inner and not loop.first and block.calls|length == 1 and block.calls[0].name == "display_answers" -%}
{%- set ns.in_inner = false -%}
{{- outer_token -}}
{%- endif -%}
{%- for tc in block.calls -%}
{{- "\n<tool_call>\n{\"name\": \"" ~ tc.name ~ "\", \"arguments\": " -}}
{%- if tc.arguments is mapping -%}
{{- tc.arguments | tojson -}}
{%- else -%}
{{- tc.arguments -}}
{%- endif -%}
{{- "}\n</tool_call>" -}}
{%- endfor -%}
{%- set ns.waiting_for_tool_outputs = true -%}
{%- elif block.type == "tool_outputs" -%}
{# If you ever have inline tool outputs, render as <tool_response> blocks inline #}
{%- for out in block.outputs -%}
{{- "\n<tool_response>\n" ~ out.output ~ "\n</tool_response>" -}}
{%- endfor -%}
{%- set ns.waiting_for_tool_outputs = false -%}
{%- elif block.type == "response" -%}
{%- if ns.in_inner -%}
{%- set ns.in_inner = false -%}
{{- outer_token -}}
{%- endif -%}
{{- block.text -}}
{%- else -%}
{{- raise_exception("Invalid assistant block type: " ~ block.type) -}}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{# tool_calls field on assistant messages #}
{%- if "tool_calls" in message and message.tool_calls -%}
{%- for tool_call in message.tool_calls -%}
{%- set tc = tool_call.function if tool_call.function is defined else tool_call -%}
{%- set tc_name = tc.name -%}
{%- set tc_args = tc.arguments -%}
{{- "\n<tool_call>\n{\"name\": \"" ~ tc_name ~ "\", \"arguments\": " -}}
{%- if tc_args is mapping -%}
{{- tc_args | tojson -}}
{%- else -%}
{{- tc_args -}}
{%- endif -%}
{{- "}\n</tool_call>" -}}
{%- endfor -%}
{%- set ns.waiting_for_tool_outputs = true -%}
{%- endif -%}
{%- else -%}
{{- raise_exception("Invalid message role: " ~ message.role) -}}
{%- endif -%}
{%- endfor -%}
{# close any open tool-group user turn #}
{%- if ns.in_tool_group -%}
{{- end_user_token -}}
{%- endif -%}
{# close assistant if appropriate #}
{%- if ns.in_assistant
and not (continue_assistant_message is defined and continue_assistant_message)
and not ns.waiting_for_tool_outputs -%}
{{- end_assistant_token -}}
{%- endif -%}
{%- if add_generation_prompt -%}
{{- assistant_token -}}
{%- endif -%}

38
config.json Normal file
View File

@@ -0,0 +1,38 @@
{
"architectures": [
"ApertusForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 1,
"dtype": "bfloat16",
"eos_token_id": 68,
"hidden_act": "xielu",
"hidden_dropout": 0.0,
"hidden_size": 4096,
"initializer_range": 0.02,
"intermediate_size": 21504,
"max_position_embeddings": 65536,
"mlp_bias": false,
"model_type": "apertus",
"num_attention_heads": 32,
"num_hidden_layers": 32,
"num_key_value_heads": 8,
"pad_token_id": 3,
"post_norm": false,
"qk_norm": true,
"rms_norm_eps": 1e-05,
"rope_scaling": {
"factor": 8.0,
"high_freq_factor": 4.0,
"low_freq_factor": 1.0,
"original_max_position_embeddings": 8192,
"rope_type": "llama3",
"type": "llama3"
},
"rope_theta": 12000000,
"tie_word_embeddings": false,
"transformers_version": "4.57.1",
"use_cache": false,
"vocab_size": 131072
}

12
generation_config.json Normal file
View File

@@ -0,0 +1,12 @@
{
"_from_model_config": true,
"bos_token_id": 1,
"do_sample": true,
"eos_token_id": [
2,
68,
72
],
"pad_token_id": 3,
"transformers_version": "4.57.1"
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,459 @@
{
"metadata": {
"total_parameters": 8053338240,
"total_size": 16106676480
},
"weight_map": {
"lm_head.weight": "model-00004-of-00004.safetensors",
"model.embed_tokens.weight": "model-00001-of-00004.safetensors",
"model.layers.0.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.0.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.0.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.0.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.0.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.0.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.0.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.0.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.1.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.1.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.1.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.1.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.1.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.1.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.1.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.1.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.10.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.10.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.10.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.10.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.10.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.10.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.10.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.10.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.11.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.11.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.11.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.11.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.11.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.11.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.11.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.11.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.12.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.12.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.12.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.12.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.12.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.12.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.12.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.12.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.13.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.13.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.13.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.13.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.13.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.13.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.13.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.13.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.14.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.14.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.14.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.14.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.14.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.14.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.14.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.14.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.15.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.15.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.15.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.15.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.15.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.15.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.15.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.15.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.16.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.16.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.16.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.16.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.16.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.16.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.16.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.16.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.17.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.17.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.17.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.17.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.17.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.17.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.17.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.17.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.18.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.18.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.18.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.18.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.18.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.18.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.18.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.18.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.19.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.19.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.19.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.19.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.19.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.19.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.19.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.19.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.19.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.19.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.2.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.2.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.2.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.2.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.2.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.2.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.2.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.2.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.20.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.20.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.20.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.20.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.20.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.20.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.20.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.20.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.20.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.20.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.20.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.20.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.21.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.21.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.21.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.21.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.21.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.21.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.21.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.21.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.22.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.22.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.22.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.22.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.22.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.22.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.22.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.22.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.23.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.23.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.23.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.23.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.23.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.23.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.23.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.23.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.24.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.24.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.24.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.24.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.24.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.24.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.24.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.24.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.25.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.25.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.25.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.25.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.25.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.25.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.25.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.25.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.26.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.26.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.26.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.26.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.26.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.26.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.26.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.26.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.27.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.27.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.27.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.27.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.27.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.27.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.27.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.27.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.28.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.28.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.28.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.28.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.28.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.28.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.28.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.28.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.29.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.29.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.29.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.29.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.29.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.29.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.29.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.29.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.3.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.3.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.3.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.3.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.3.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.3.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.3.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.3.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.30.attention_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.30.feedforward_layernorm.weight": "model-00003-of-00004.safetensors",
"model.layers.30.mlp.act_fn.alpha_n": "model-00003-of-00004.safetensors",
"model.layers.30.mlp.act_fn.alpha_p": "model-00003-of-00004.safetensors",
"model.layers.30.mlp.act_fn.beta": "model-00003-of-00004.safetensors",
"model.layers.30.mlp.act_fn.eps": "model-00003-of-00004.safetensors",
"model.layers.30.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.30.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.30.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.30.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.31.attention_layernorm.weight": "model-00004-of-00004.safetensors",
"model.layers.31.feedforward_layernorm.weight": "model-00004-of-00004.safetensors",
"model.layers.31.mlp.act_fn.alpha_n": "model-00004-of-00004.safetensors",
"model.layers.31.mlp.act_fn.alpha_p": "model-00004-of-00004.safetensors",
"model.layers.31.mlp.act_fn.beta": "model-00004-of-00004.safetensors",
"model.layers.31.mlp.act_fn.eps": "model-00004-of-00004.safetensors",
"model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
"model.layers.31.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.31.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.31.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.31.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.31.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
"model.layers.31.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.31.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
"model.layers.4.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.4.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.4.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.4.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.4.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.4.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.4.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.4.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.5.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.5.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.5.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.5.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.5.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.5.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.5.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.5.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.6.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.6.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.6.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.6.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.6.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.6.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.6.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.6.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.7.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.7.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.7.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.7.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.7.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.7.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.7.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.7.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.7.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.8.attention_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.8.feedforward_layernorm.weight": "model-00001-of-00004.safetensors",
"model.layers.8.mlp.act_fn.alpha_n": "model-00001-of-00004.safetensors",
"model.layers.8.mlp.act_fn.alpha_p": "model-00001-of-00004.safetensors",
"model.layers.8.mlp.act_fn.beta": "model-00001-of-00004.safetensors",
"model.layers.8.mlp.act_fn.eps": "model-00001-of-00004.safetensors",
"model.layers.8.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.8.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.8.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.8.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.8.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.8.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
"model.layers.8.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
"model.layers.9.attention_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.9.feedforward_layernorm.weight": "model-00002-of-00004.safetensors",
"model.layers.9.mlp.act_fn.alpha_n": "model-00002-of-00004.safetensors",
"model.layers.9.mlp.act_fn.alpha_p": "model-00002-of-00004.safetensors",
"model.layers.9.mlp.act_fn.beta": "model-00002-of-00004.safetensors",
"model.layers.9.mlp.act_fn.eps": "model-00002-of-00004.safetensors",
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.9.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.9.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
"model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
"model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
"model.norm.weight": "model-00004-of-00004.safetensors"
}
}

View File

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

30
special_tokens_map.json Normal file
View File

@@ -0,0 +1,30 @@
{
"bos_token": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|assistant_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<pad>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

3
tokenizer.json Normal file
View File

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

8020
tokenizer_config.json Normal file

File diff suppressed because it is too large Load Diff