初始化项目,由ModelHub XC社区提供模型
Model: vysri/SmolLM135M-IT-ConvFill 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
|
||||||
56
README.md
Normal file
56
README.md
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
license: apache-2.0
|
||||||
|
base_model:
|
||||||
|
- HuggingFaceTB/SmolLM2-135M-Instruct
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
datasets:
|
||||||
|
- zenglhardt/convfill-dataset
|
||||||
|
---
|
||||||
|
# Model Card for SmolLM135M-IT-ConvFill
|
||||||
|
|
||||||
|
This model card implements a finetune of [HuggingFaceTB/SmolLM2-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct) for the conversational infill task described in the [ConvFill paper](https://arxiv.org/abs/2511.07397).
|
||||||
|
|
||||||
|
## Model Details
|
||||||
|
|
||||||
|
This model should be used respecting the original license of the base model, HuggingFaceTB/SmolLM2-135M-Instruct. The dataset that was used to finetune this model can be found [here](https://huggingface.co/datasets/zenglhardt/convfill-dataset).
|
||||||
|
|
||||||
|
### Model Description
|
||||||
|
Deploying responsive, multi-turn conversational voice agents with large language models poses a critical challenge: cloud-based foundation models utilize reasoning, information retrieval, and tool use for high-value tasks, but introduce latency that disrupts natural conversation. In contrast, small models can respond quickly but lack capabilities needed in real-world tasks. We propose _conversational infill_, a task where a small, local model generates prompt, contextually appropriate dialogue and seamlessly incorporates delayed, external knowledge produced in parallel by a foundation model backend. This finetune trains HuggingFaceTB/SmolLM2-135M-Instruct to perform the conversational infill task.
|
||||||
|
|
||||||
|
- **Finetuned from model:** [HuggingFaceTB/SmolLM2-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct)
|
||||||
|
- **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
|
||||||
|
### Model Sources [optional]
|
||||||
|
|
||||||
|
- **Repository:** https://github.com/vysri/conversational-infill
|
||||||
|
- **Paper:** [Thinking While Speaking: Inference-Time Knowledge Transfer for Responsive and Intelligent Conversational Voice Agents](https://arxiv.org/abs/2511.07397)
|
||||||
|
- **Demo:** TBD
|
||||||
|
|
||||||
|
### Direct Use
|
||||||
|
|
||||||
|
This model is intended to be used with the infrastructure in the [ConvFill repository](https://github.com/vysri/conversational-infill).
|
||||||
|
|
||||||
|
## Bias, Risks, and Limitations
|
||||||
|
|
||||||
|
This model is not explicitly tuned for guardrailed behavior. Please use with caution.
|
||||||
|
|
||||||
|
## How to Get Started with the Model
|
||||||
|
Use the code in the [ConvFill repository](https://github.com/vysri/conversational-infill) to get started with this model.
|
||||||
|
|
||||||
|
### Training Data
|
||||||
|
A link to the training data for this model can be found [here](https://huggingface.co/datasets/zenglhardt/convfill-dataset). The dataset generation procedure can be found [here](https://github.com/zenglhardt/convfill-dataset). Information on training procedures can be found in the [ConvFill paper](https://arxiv.org/abs/2511.07397). Training code and scripts can be found in the [ConvFill repository](https://github.com/vysri/conversational-infill).
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
```
|
||||||
|
@misc{srinivas2026thinkingspeakinginferencetimeknowledge,
|
||||||
|
title={Thinking While Speaking: Inference-Time Knowledge Transfer for Responsive and Intelligent Conversational Voice Agents},
|
||||||
|
author={Vidya Srinivas and Zachary Englhardt and Shwetak Patel and Vikram Iyer},
|
||||||
|
year={2026},
|
||||||
|
eprint={2511.07397},
|
||||||
|
archivePrefix={arXiv},
|
||||||
|
primaryClass={cs.CL},
|
||||||
|
url={https://arxiv.org/abs/2511.07397},
|
||||||
|
}
|
||||||
|
```
|
||||||
6
chat_template.jinja
Normal file
6
chat_template.jinja
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
|
||||||
|
You are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>
|
||||||
|
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
|
||||||
|
' + message['content'] + '<|im_end|>' + '
|
||||||
|
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
||||||
|
' }}{% endif %}
|
||||||
40
config.json
Normal file
40
config.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"LlamaForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"eos_token_id": 2,
|
||||||
|
"head_dim": 64,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 576,
|
||||||
|
"initializer_range": 0.041666666666666664,
|
||||||
|
"intermediate_size": 1536,
|
||||||
|
"is_llama_config": true,
|
||||||
|
"max_position_embeddings": 8192,
|
||||||
|
"mlp_bias": false,
|
||||||
|
"model_type": "llama",
|
||||||
|
"num_attention_heads": 9,
|
||||||
|
"num_hidden_layers": 30,
|
||||||
|
"num_key_value_heads": 3,
|
||||||
|
"pad_token_id": 2,
|
||||||
|
"pretraining_tp": 1,
|
||||||
|
"rms_norm_eps": 1e-05,
|
||||||
|
"rope_interleaved": false,
|
||||||
|
"rope_parameters": {
|
||||||
|
"rope_theta": 100000,
|
||||||
|
"rope_type": "default"
|
||||||
|
},
|
||||||
|
"tie_word_embeddings": true,
|
||||||
|
"transformers.js_config": {
|
||||||
|
"kv_cache_dtype": {
|
||||||
|
"fp16": "float16",
|
||||||
|
"q4f16": "float16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"transformers_version": "5.5.4",
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 49153
|
||||||
|
}
|
||||||
36
config.snapshot.json
Normal file
36
config.snapshot.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"model_name": "HuggingFaceTB/SmolLM2-135M-Instruct",
|
||||||
|
"dataset_path": "your_dataset_path_here",
|
||||||
|
"dataset_mode": "full",
|
||||||
|
"platform": "gpu",
|
||||||
|
"wanb_project": "convfill",
|
||||||
|
"training_split_percent": 0.9,
|
||||||
|
"add_special_tokens": true,
|
||||||
|
"special_tokens": {
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<sil>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"boundary_tokens": {
|
||||||
|
"USER_START": "<|im_start|>user\n",
|
||||||
|
"KNOWLEDGE_START": "<|im_start|>knowledge\n",
|
||||||
|
"ASSN_START": "<|im_start|>assistant\n",
|
||||||
|
"END": "<|im_end|>\n"
|
||||||
|
},
|
||||||
|
"training_config": {
|
||||||
|
"batch_size": 4,
|
||||||
|
"accumulate_grad_batches": 4,
|
||||||
|
"num_epochs": 1,
|
||||||
|
"learning_rate": 0.0001,
|
||||||
|
"weight_decay": 0.01,
|
||||||
|
"warmup_steps": 200,
|
||||||
|
"scheduler": "cosine",
|
||||||
|
"val_check_interval": 0.25
|
||||||
|
},
|
||||||
|
"logging_config": {
|
||||||
|
"log_every_n_steps": 10
|
||||||
|
},
|
||||||
|
"checkpoint_config": {
|
||||||
|
"every_n_train_steps": 50
|
||||||
|
}
|
||||||
|
}
|
||||||
7
generation_config.json
Normal file
7
generation_config.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_from_model_config": true,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"eos_token_id": 2,
|
||||||
|
"pad_token_id": 2,
|
||||||
|
"transformers_version": "5.5.4"
|
||||||
|
}
|
||||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e521201b918d98dbc15a0b7d3a594a2027f717f6c61597776ce5a7b85b2ef8fc
|
||||||
|
size 269061704
|
||||||
244974
tokenizer.json
Normal file
244974
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
17
tokenizer_config.json
Normal file
17
tokenizer_config.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"add_prefix_space": false,
|
||||||
|
"backend": "tokenizers",
|
||||||
|
"bos_token": "<|im_start|>",
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<|im_end|>",
|
||||||
|
"errors": "replace",
|
||||||
|
"extra_special_tokens": [
|
||||||
|
"<sil>"
|
||||||
|
],
|
||||||
|
"is_local": false,
|
||||||
|
"model_max_length": 8192,
|
||||||
|
"pad_token": "<|im_end|>",
|
||||||
|
"tokenizer_class": "GPT2Tokenizer",
|
||||||
|
"unk_token": "<|endoftext|>",
|
||||||
|
"vocab_size": 49152
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user