初始化项目,由ModelHub XC社区提供模型
Model: Boldt/Boldt-1B-IT-Preview Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal 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
|
||||
logo.png filter=lfs diff=lfs merge=lfs -text
|
||||
89
README.md
Normal file
89
README.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
language:
|
||||
- de
|
||||
pipeline_tag: text-generation
|
||||
library_name: transformers
|
||||
tags:
|
||||
- instruction-tuned
|
||||
- german
|
||||
base_model:
|
||||
- Boldt/Boldt-1B
|
||||
---
|
||||
|
||||
# Boldt-1B-IT-Preview
|
||||
|
||||
<img src="logo.png" width="500">
|
||||
|
||||
**Boldt-1B-IT-Preview** is a preview of an instruction-tuned German language model, fine-tuned on top of [Boldt-1B](https://huggingface.co/Boldt/Boldt-1B). It is part of the **Boldt** series of German Small Language Models (SLMs) trained from scratch at Humboldt-Universität zu Berlin.
|
||||
|
||||
- [Boldt-DC-350M](https://huggingface.co/Boldt/Boldt-DC-350M)
|
||||
- [Boldt-DC-1B](https://huggingface.co/Boldt/Boldt-DC-1B)
|
||||
- [Boldt-1B](https://huggingface.co/Boldt/Boldt-1B)
|
||||
- **Boldt-1B-IT-Preview** *(this model)*
|
||||
|
||||
> **Preview status.** This is an early release intended to demonstrate instruction-following capabilities emerging from our quality-focused pre-training recipe. It has not undergone systematic safety evaluation and should not be used in production settings without further assessment.
|
||||
|
||||
## Training data
|
||||
|
||||
Boldt-1B-IT-Preview was fine-tuned on a curated mixture of 95k German instruction-output pairs from four sources:
|
||||
|
||||
- **Aya:** German subset of the [Aya dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset), consisting of approximately 200 human-authored instruction-output pairs.
|
||||
- **SmolTalk2 (DE, improved):** an improved German subset of the [SmolTalk2](https://huggingface.co/datasets/HuggingFaceTB/smoltalk2) dataset. We adjusted 52k prompts for more natural flowing German and regenerated outputs using [Qwen-3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) to improve their quality.
|
||||
- **r/FragReddit:** 7k prompts sourced from the [r/FragReddit](https://www.reddit.com/r/FragReddit/) subreddit. Outputs were generated using [Qwen-3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B).
|
||||
- **Synthetic Reddit:** 19k synthetic QA pairs derived from a dump of r/FragReddit posts. We used [Qwen-3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) to filter useful posts, rephrase questions for clarity, and generate helpful and educational answers.
|
||||
- **NER instructions:** 17k NER tasks derived from 2 German NER datasets.
|
||||
|
||||
The mixture is designed to combine broad topical coverage with naturalness of German expression, complementing the information-dense pre-training corpus underlying the base model.
|
||||
|
||||
## Usage
|
||||
|
||||
Boldt-1B-IT-Preview is designed for single-turn German-language instruction-following tasks. It was not fine-tuned for multi-turn conversations, and performance in multi-turn settings is not guaranteed. It uses a standard chat template and can be used as follows:
|
||||
|
||||
```python
|
||||
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||
|
||||
model_name = "Boldt/Boldt-1B-IT-Preview"
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||||
model = AutoModelForCausalLM.from_pretrained(model_name)
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Erkläre mir kurz, wie Quantencomputer funktionieren."}
|
||||
]
|
||||
|
||||
input_ids = tokenizer.apply_chat_template(
|
||||
messages,
|
||||
tokenize=True,
|
||||
add_generation_prompt=True,
|
||||
return_tensors="pt"
|
||||
)
|
||||
|
||||
outputs = model.generate(
|
||||
input_ids,
|
||||
max_new_tokens=256,
|
||||
do_sample=True,
|
||||
temperature=0.7,
|
||||
top_p=0.9,
|
||||
)
|
||||
print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True))
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
- **Language:** This model is optimized for German. Other languages are not supported.
|
||||
- **Preview status:** This model is released as a research preview. It may produce factually incorrect or inconsistent outputs. Not optimized for multi-turn dialogue.
|
||||
- **Safety:** We have not conducted systematic evaluations for toxic content, demographic biases, or harmful stereotypes. Quality filtering during pre-training may reduce some risks relative to unfiltered corpora but cannot eliminate them. Repeated multi-epoch exposure may amplify encoded biases. Users should exercise caution in sensitive applications.
|
||||
|
||||
## Citation
|
||||
|
||||
```bibtex
|
||||
@misc{boldt,
|
||||
title={Repetition over Diversity: High-Signal Data Filtering for Sample-Efficient German Language Modeling},
|
||||
author={Ansar Aynetdinov and Patrick Haller and Alan Akbik},
|
||||
year={2026},
|
||||
eprint={2604.28075},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.CL},
|
||||
url={https://arxiv.org/abs/2604.28075},
|
||||
}
|
||||
```
|
||||
5
added_tokens.json
Normal file
5
added_tokens.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"<|assistant|>": 32002,
|
||||
"<|system|>": 32000,
|
||||
"<|user|>": 32001
|
||||
}
|
||||
20
chat_template.jinja
Normal file
20
chat_template.jinja
Normal file
@@ -0,0 +1,20 @@
|
||||
{%- if messages[0]['role'] != 'system' -%}
|
||||
{%- set messages = [{'role': 'system', 'content': 'Du bist ein hilfreicher KI-Assistent.'}] + messages -%}
|
||||
{%- endif -%}
|
||||
{%- for message in messages -%}
|
||||
{%- if message['role'] == 'user' -%}
|
||||
{{ '<|user|>
|
||||
' + message['content'] + eos_token }}
|
||||
{%- elif message['role'] == 'system' -%}
|
||||
{{ '<|system|>
|
||||
' + message['content'] + eos_token }}
|
||||
{%- elif message['role'] == 'assistant' -%}
|
||||
{% generation %}{{ '<|assistant|>
|
||||
' + message['content'] + eos_token }}{% endgeneration %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if add_generation_prompt -%}
|
||||
{{ '<|assistant|>
|
||||
' }}
|
||||
{%- endif -%}
|
||||
|
||||
30
config.json
Normal file
30
config.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 0,
|
||||
"dtype": "bfloat16",
|
||||
"eos_token_id": 0,
|
||||
"head_dim": 128,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 2048,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 8192,
|
||||
"max_position_embeddings": 4096,
|
||||
"mlp_bias": false,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 16,
|
||||
"num_hidden_layers": 16,
|
||||
"num_key_value_heads": 16,
|
||||
"pad_token_id": 1,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": false,
|
||||
"transformers_version": "4.57.3",
|
||||
"use_cache": true,
|
||||
"vocab_size": 32064
|
||||
}
|
||||
9
generation_config.json
Normal file
9
generation_config.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 0,
|
||||
"eos_token_id": [
|
||||
0
|
||||
],
|
||||
"pad_token_id": 1,
|
||||
"transformers_version": "4.57.3"
|
||||
}
|
||||
3
logo.png
Normal file
3
logo.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4f407443899af03737c73da20474835b840cedb216ce1b491901b598cc2c8d85
|
||||
size 517295
|
||||
31743
merges.txt
Normal file
31743
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7bcc7ed8bd9a5b2846ce09d7d654f946335b11ea19f7263d5c1136543dccc7a5
|
||||
size 2410304008
|
||||
53
special_tokens_map.json
Normal file
53
special_tokens_map.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
{
|
||||
"content": "<|system|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
{
|
||||
"content": "<|user|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
{
|
||||
"content": "<|assistant|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
],
|
||||
"bos_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<|pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"unk_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
159053
tokenizer.json
Normal file
159053
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
58
tokenizer_config.json
Normal file
58
tokenizer_config.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<|pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32000": {
|
||||
"content": "<|system|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32001": {
|
||||
"content": "<|user|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32002": {
|
||||
"content": "<|assistant|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<|system|>",
|
||||
"<|user|>",
|
||||
"<|assistant|>"
|
||||
],
|
||||
"bos_token": "<|endoftext|>",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|endoftext|>",
|
||||
"extra_special_tokens": {},
|
||||
"model_max_length": 4096,
|
||||
"pad_token": "<|pad|>",
|
||||
"tokenizer_class": "GPT2Tokenizer",
|
||||
"unk_token": "<|endoftext|>"
|
||||
}
|
||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user