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

Model: daslab-testing/Apertus-3B-DPO-wnorm2both
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-08-09 16:05:16 +08:00
commit 0464e2304b
8 changed files with 307 additions and 0 deletions

36
.gitattributes vendored Normal file
View File

@@ -0,0 +1,36 @@
*.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
tokenizer.json filter=lfs diff=lfs merge=lfs -text

199
README.md Normal file
View File

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

5
chat_template.jinja Normal file
View File

@@ -0,0 +1,5 @@
{{ bos_token }}{%- set system_token = '<SPECIAL_61>' -%}{%- set end_system_token = '<SPECIAL_62>' -%}{%- set developer_token = '<SPECIAL_63>' -%}{%- set end_developer_token = '<SPECIAL_64>' -%}{%- set user_token = '<SPECIAL_65>' -%}{%- set end_user_token = '<SPECIAL_66>' -%}{%- set assistant_token = '<SPECIAL_67>' -%}{%- set end_assistant_token = '<SPECIAL_68>' -%}{%- set inner_token = '<SPECIAL_69>' -%}{%- set outer_token = '<SPECIAL_70>' -%}{%- set tool_calls_token = '<SPECIAL_71>' -%}{%- set end_tool_calls_token = '<SPECIAL_72>' -%}{%- if messages and messages[0].role == 'system' -%} {%- set system_content = messages[0].content -%} {{ system_token }} {%- if system_content is string -%} {{ system_content }} {%- elif system_content is mapping and "text" in system_content -%} {{ system_content.text }} {%- else -%} {{- raise_exception("Invalid system content: " + str(system_content)) -}} {%- endif -%} {{ end_system_token }} {%- set messages_without_system = messages[1:] -%}{%- else -%} {{ system_token + end_system_token }} {%- set messages_without_system = messages -%}{%- endif -%}{%- if messages_without_system and messages_without_system[0].role == 'developer' -%} {%- set developer_content = messages_without_system[0].content -%} {{ developer_token }} {%- if "has_thinking" in developer_content -%} {{ 'Deliberation: ' }} {%- if developer_content.has_thinking -%} {{ 'enabled' }} {%- else -%} {{ 'disabled' }} {%- endif -%} {{ '
' }} {%- else -%} {{ 'Deliberation: disabled
' }} {%- endif -%} {%- if "formatted_tools" in developer_content and developer_content.formatted_tools -%} {{ 'Tool Capabilities:
' + developer_content.formatted_tools }} {%- else -%} {{ 'Tool Capabilities: disabled' }} {%- endif -%} {{ end_developer_token }} {%- set loop_messages = messages_without_system[1:] -%}{%- else -%} {{ developer_token + 'Deliberation: disabled
Tool Capabilities: disabled' + end_developer_token }} {%- set loop_messages = messages_without_system -%}{%- endif -%}{%- for message in loop_messages -%} {%- set content = message.content -%} {%- if message.role == 'user' -%} {{ user_token }} {%- if content is string -%} {{ content }} {%- elif content is sequence -%} {%- for part in content.parts -%} {%- if part.type == 'text' -%} {{ part.text }} {%- endif -%} {%- endfor -%} {%- else -%} {{- raise_exception("Invalid user content: " + str(content)) -}} {%- endif -%} {{ end_user_token }} {%- elif message.role == 'assistant' -%} {{ assistant_token }} {%- if content is string -%} {{ content }} {%- elif content is sequence -%} {%- set ns = namespace(in_inner=false) -%} {%- for block in 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 -%} {{ tool_calls_token + '[' }} {%- for tool_call in block.calls -%} {{- '{"' + tool_call.name + '": ' + tool_call.arguments + '}' }} {%- if not loop.last -%} {{- ", " }} {%- endif -%} {%- endfor -%} {{ ']' + end_tool_calls_token }} {%- elif block.type == 'tool_outputs' -%} {{ '[' }} {%- for tool_output in block.outputs -%} {{- tool_output.output }} {%- if not loop.last -%} {{- ", " }} {%- endif -%} {%- endfor -%} {{- ']' }} {%- if not loop.last -%} {{- ' ' }} {%- endif -%} {%- elif block.type == 'response' -%} {%- if not loop.first and ns.in_inner -%} {%- set ns.in_inner = false -%} {{ outer_token }} {%- endif -%} {{ block.text }} {%- else -%} {{- raise_exception("Invalid block type: " + block.type) -}} {%- endif -%} {%- endfor -%} {%- else -%} {{- raise_exception("Invalid assistant content: " + str(content)) -}} {%- endif -%} {{ end_assistant_token }} {%- else -%} {{- raise_exception("Invalid message role: " + message.role) -}} {%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%} {{ assistant_token }}{%- endif -%}

34
config.json Normal file
View File

@@ -0,0 +1,34 @@
{
"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": 3072,
"initializer_range": 0.02,
"intermediate_size": 16384,
"max_position_embeddings": 4096,
"mlp_bias": false,
"model_type": "apertus",
"num_attention_heads": 24,
"num_hidden_layers": 24,
"num_key_value_heads": 8,
"pad_token_id": 10,
"post_norm": false,
"qk_norm": true,
"rms_norm_eps": 1e-05,
"rope_parameters": {
"rope_theta": 500000.0,
"rope_type": "default"
},
"rope_theta": 500000.0,
"tie_word_embeddings": false,
"transformers_version": "5.7.0",
"use_cache": false,
"vocab_size": 131072
}

9
generation_config.json Normal file
View File

@@ -0,0 +1,9 @@
{
"_from_model_config": true,
"bos_token_id": 1,
"eos_token_id": [
68
],
"pad_token_id": 10,
"transformers_version": "5.7.0"
}

3
model.safetensors Normal file
View File

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

3
tokenizer.json Normal file
View File

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

18
tokenizer_config.json Normal file
View File

@@ -0,0 +1,18 @@
{
"add_prefix_space": false,
"backend": "tokenizers",
"bos_token": "<s>",
"clean_up_tokenization_spaces": false,
"eos_token": "<SPECIAL_68>",
"is_local": false,
"local_files_only": false,
"model_input_names": [
"input_ids",
"attention_mask"
],
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<pad>",
"padding_side": "left",
"tokenizer_class": "TokenizersBackend",
"unk_token": "<unk>"
}