初始化项目,由ModelHub XC社区提供模型
Model: MultiverseComputingCAI/LittleLamb Source: Original Platform
This commit is contained in:
39
.gitattributes
vendored
Normal file
39
.gitattributes
vendored
Normal 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
|
||||||
|
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||||
|
assets/littlelamb-intelligence-thinking-family.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
assets/littlelamb-intelligence-nothinking-family.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
assets/littlelamb-performance-family.png filter=lfs diff=lfs merge=lfs -text
|
||||||
297
README.md
Normal file
297
README.md
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
base_model:
|
||||||
|
|
||||||
|
- Qwen/Qwen3-0.6B
|
||||||
|
- MultiverseComputing/LittleLamb-0.3B
|
||||||
|
library_name: transformers
|
||||||
|
license: apache-2.0
|
||||||
|
|
||||||
|
---
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
# LittleLamb 0.3B
|
||||||
|
|
||||||
|
### Powered by CompactifAI
|
||||||
|
|
||||||
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
|
[](https://huggingface.co/MultiverseComputingCAI/LittleLamb)
|
||||||
|
[](https://discord.gg/cGas9uStqp)
|
||||||
|
|
||||||
|
**Tiny Model** · **50% Compressed** · **Thinking & Non-Thinking Modes**
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Highlights](#highlights)
|
||||||
|
- [Model Overview](#model-overview)
|
||||||
|
- [Key Characteristics](#key-characteristics)
|
||||||
|
- [Quick Start](#quick-start)
|
||||||
|
- [What's New in LittleLamb 0.3B](#whats-new-in-littlelamb-03b)
|
||||||
|
- [Dual-Mode Inference (Thinking / Non-Thinking)](#dual-mode-inference-thinking--non-thinking)
|
||||||
|
- [Training & Fine-Tuning](#training--fine-tuning)
|
||||||
|
- [Architecture](#architecture)
|
||||||
|
- [Evaluation & Benchmarks](#evaluation--benchmarks)
|
||||||
|
- [Languages](#languages)
|
||||||
|
- [Intended Use](#intended-use)
|
||||||
|
- [Safety & Limitations](#safety--limitations)
|
||||||
|
- [Model Information](#model-information)
|
||||||
|
- [Citation](#citation)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Model Overview
|
||||||
|
|
||||||
|
**LittleLamb 0.3B** is a **general-purpose bilingual model** at **290M parameters**, a similar size class to **270M** models such as **gemma3-270m-it** and **functiongemma-270m-it**—developed based on [Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B), by **Multiverse Computing**. The original Qwen3-0.6B is an open-weight, instruction-tuned model with thinking and non-thinking capabilities and multilingual coverage. LittleLamb 0.3B is compressed at a **50% compression rate** using **CompactifAI**, Multiverse Computing's proprietary technology. The model supports **English and Spanish** and retains Qwen3's dual thinking/non-thinking modes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Key Characteristics
|
||||||
|
|
||||||
|
|
||||||
|
| Characteristic | Description |
|
||||||
|
| ---------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| Base model | [Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) (0.6B params, 0.44B non-embedding; open-weight, Apache 2.0) |
|
||||||
|
| **Parameters** | 290M total parameters after CompactifAI compression (50% compression rate from base 0.6B) |
|
||||||
|
| **Architecture** | Decoder-only Transformer (Qwen3 family) |
|
||||||
|
| **Compression** | CompactifAI (proprietary) |
|
||||||
|
| **Languages** | English and Spanish; inherits broader multilingual tokenizer coverage from Qwen3 |
|
||||||
|
| **Modes** | Thinking (`enable_thinking=True`) and non-thinking (`enable_thinking=False`) via chat template |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
This model can be loaded with the **Transformers** library. Requires `transformers>=4.51.0` for Qwen3 architecture support.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
model_id = "MultiverseComputingCAI/LittleLamb"
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
|
model_id,
|
||||||
|
torch_dtype="auto",
|
||||||
|
device_map="auto",
|
||||||
|
)
|
||||||
|
|
||||||
|
messages = [{"role": "user", "content": "Hello!"}]
|
||||||
|
text = tokenizer.apply_chat_template(
|
||||||
|
messages,
|
||||||
|
tokenize=False,
|
||||||
|
add_generation_prompt=True,
|
||||||
|
enable_thinking=True,
|
||||||
|
)
|
||||||
|
inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
||||||
|
output_ids = model.generate(**inputs, max_new_tokens=256)[0]
|
||||||
|
response = tokenizer.decode(
|
||||||
|
output_ids[len(inputs.input_ids[0]) :], skip_special_tokens=True
|
||||||
|
)
|
||||||
|
print(response)
|
||||||
|
```
|
||||||
|
|
||||||
|
For OpenAI-compatible serving, use a stack that supports Qwen3 reasoning (e.g. recent **vLLM** or **SGLang** with Qwen3 parsers); see the [Qwen3-0.6B model card](https://huggingface.co/Qwen/Qwen3-0.6B) for deployment examples.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What's New in LittleLamb 0.3B
|
||||||
|
|
||||||
|
### Summary
|
||||||
|
|
||||||
|
- **Ultra-compact general-purpose model** at 290M parameters, suitable for edge and on-device deployment.
|
||||||
|
- **Developed based on [Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B)** with **CompactifAI** compression (~50% parameter reduction vs. base non-embedding count).
|
||||||
|
- **Bilingual focus:** English and Spanish for supported use cases.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Dual-Mode Inference (Thinking / Non-Thinking)
|
||||||
|
|
||||||
|
LittleLamb 0.3B inherits Qwen3's dual-mode capability, supporting seamless switching between **thinking mode** (for complex reasoning) and **non-thinking mode** (for efficient general-purpose dialogue).
|
||||||
|
|
||||||
|
The model generates internal reasoning in Qwen3’s thinking format (see the Qwen3 chat template) before producing the final response. Use this for tasks requiring multi-step reasoning, math, or code generation.
|
||||||
|
|
||||||
|
Set `enable_thinking=False` for lower-latency dialogue without explicit chain-of-thought in the template. Follow the **sampling parameters** recommended in the [Qwen3-0.6B model card](https://huggingface.co/Qwen/Qwen3-0.6B) for each mode.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Training & Fine-Tuning
|
||||||
|
|
||||||
|
### Base Model: Qwen3-0.6B
|
||||||
|
|
||||||
|
The base model [Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) is a causal language model from the Qwen3 family, supporting thinking/non-thinking. See the [Qwen3 technical report](https://arxiv.org/abs/2505.09388) for details.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Model Specifications
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
| ---------------- | ----------------------------------------------------------------------- |
|
||||||
|
| Base model | [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) (0.6B params) |
|
||||||
|
| Total parameters |290M dense |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Evaluation & Benchmarks
|
||||||
|
|
||||||
|
### Evaluation Methodology
|
||||||
|
|
||||||
|
Benchmark scores were obtained with the following setups. Methodology varies by benchmark family.
|
||||||
|
|
||||||
|
For **LittleLamb 0.3B** and **Qwen3-0.6B (base)**, benchmark runs are reported under both **thinking** and **non-thinking** chat modes using the sampling settings recommended in the [Qwen3-0.6B model card](https://huggingface.co/Qwen/Qwen3-0.6B).
|
||||||
|
|
||||||
|
#### MMLU-Pro, GPQA Diamond, HLE (Humanity's Last Exam)
|
||||||
|
|
||||||
|
- **Evaluation framework**: [Nemo-skills](https://github.com/NVIDIA/NeMo-Skills)
|
||||||
|
- **Inference library**: vLLM 0.18.0
|
||||||
|
- **Thinking mode** (`enable_thinking=True`, per Qwen3-0.6B instruct): temperature = 0.6, top_p = 0.95, top_k = 20, min_p = 0
|
||||||
|
- **Non-thinking mode** (`enable_thinking=False`, per Qwen3-0.6B instruct): temperature = 0.7, top_p = 0.8, top_k = 20, min_p = 0
|
||||||
|
|
||||||
|
### Quantitative Results (Reported & Planned)
|
||||||
|
|
||||||
|
Reported numbers use the methodology described above.
|
||||||
|
|
||||||
|
#### Thinking mode
|
||||||
|
|
||||||
|
|
||||||
|
| Benchmark | gemma3-270m-it | Qwen3-0.6B (think) | LittleLamb-0.3B (think) |
|
||||||
|
| ------------ | -------------- | ------------------ | ----------------------- |
|
||||||
|
| HLE | 4.00 | 5.65 | 6.12 |
|
||||||
|
| GPQA Diamond | 21.21 | 29.59 | 28.18 |
|
||||||
|
| MMLU-Pro | 6.23 | 38.27 | 31.21 |
|
||||||
|
|
||||||
|
|
||||||
|
#### Non-thinking mode
|
||||||
|
|
||||||
|
|
||||||
|
| Benchmark | gemma3-270m-it | Qwen3-0.6B (no think) | LittleLamb-0.3B (no think) |
|
||||||
|
| ------------ | -------------- | --------------------- | -------------------------- |
|
||||||
|
| HLE | 4.00 | 4.54 | 5.37 |
|
||||||
|
| GPQA Diamond | 21.21 | 27.77 | 24.04 |
|
||||||
|
| MMLU-Pro | 6.23 | 25.72 | 25.11 |
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
### Quantitative Results (Inference Performance)
|
||||||
|
|
||||||
|
#### Metrics reported
|
||||||
|
- **System Output Throughput (higher is better)**: Mean output tokens per second across all concurrent requests over the benchmarking phase.
|
||||||
|
- **End-to-End Latency per Query (lower is better):** Median end-to-end response time for each query from the time the query is sent.
|
||||||
|
- **Output Speed per Query (higher is better):** Median output tokens per second after the first token is received for each query.
|
||||||
|
- **Time to first token (TTFT) (lower is better):** Median
|
||||||
|
- **Estimated Peak Memory Usage (lower is better):** KV cache utilization is monitored during the phase and we estimate memory usage as follows: $model\_ weights_{gb} + kv\_ cache_{usage\_pct} × (nvml\_used_{gb} − model\_ weights_{gb})$
|
||||||
|
- **Model weights (lower is better):**
|
||||||
|
|
||||||
|
**Summary of improvements:** LittleLamb shows a slight improvement in performance with respect to the original Qwen Model. This is expected as for such small models, VRAM usage is dominated by KV cache and not model weights.
|
||||||
|
|
||||||
|
#### Performance evaluation conditions
|
||||||
|
|
||||||
|
Our performance evaluation follows the spirit of [Artificial Analysis](https://artificialanalysis.ai/methodology/system-load-test).
|
||||||
|
|
||||||
|
- **Inference library**: vLLM 0.18.0
|
||||||
|
- **Monitoring libraries**: GuideLLM 0.6.0, nvidia-ml-py 13.590.48
|
||||||
|
- **Hardware**: 1× NVIDIA L4 GPU
|
||||||
|
- **Conditions**: concurrency=16
|
||||||
|
- **Phase duration**: Each phase lasts 3 minutes (excluding ramp-up and cool-down periods).
|
||||||
|
- **Workload shape**: 1,000 input tokens and 1,000 output tokens per query.
|
||||||
|
- **Streaming**: Benchmarking is conducted with streaming enabled.
|
||||||
|
|
||||||
|
|
||||||
|
**Summary of improvements:** LittleLamb shows a slight improvement in performance with respect to the original Qwen Model. This is expected as for such small models, VRAM usage is dominated by KV cache and not model weights.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Languages
|
||||||
|
|
||||||
|
- **Primary languages**: English and Spanish (supported for product use cases).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Intended Use
|
||||||
|
|
||||||
|
### Recommended Use Cases
|
||||||
|
|
||||||
|
Aligned with [Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) use cases, with the benefit of a smaller footprint suitable for edge and on-device deployment:
|
||||||
|
|
||||||
|
- **On-device and edge inference** where memory and compute are constrained
|
||||||
|
- **Reasoning tasks** with configurable thinking/non-thinking modes
|
||||||
|
- **Bilingual applications** (English and Spanish)
|
||||||
|
- **Chatbots and virtual assistants** in resource-constrained environments
|
||||||
|
- **General knowledge, math, and science** question answering
|
||||||
|
|
||||||
|
### Out-of-Scope Uses
|
||||||
|
|
||||||
|
- Harmful, illegal, or deceptive content generation
|
||||||
|
- Impersonation of real individuals without consent
|
||||||
|
- High-risk decision-making without human oversight
|
||||||
|
- Surveillance or tracking of individuals
|
||||||
|
- Any use that violates applicable laws or regulations
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Safety & Limitations
|
||||||
|
|
||||||
|
### Known Limitations
|
||||||
|
|
||||||
|
- **Model scale:** At ~0.3B parameters, this is an ultra-compact model. Several frontier-scale benchmarks (GDPval-AA, Terminal-Bench Hard, AA-LCR, CritPt) produce no discriminative signal at this model size, as the base Qwen3-0.6B itself scores near zero on them.
|
||||||
|
- **Thinking mode:** Performance differs substantially between thinking and non-thinking modes across benchmarks. Users should evaluate both modes for their specific use case.
|
||||||
|
|
||||||
|
### Recommendations
|
||||||
|
|
||||||
|
- Use human oversight for critical applications
|
||||||
|
- Perform task-specific evaluation prior to deployment
|
||||||
|
- Test both thinking and non-thinking modes for your use case
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Model Information
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
| ------------ | --------------------------------------------------------------------------- |
|
||||||
|
| Model name | LittleLamb |
|
||||||
|
| Based on | [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) |
|
||||||
|
| Version | 2604 |
|
||||||
|
| Release date | 28/04/2026 |
|
||||||
|
| Developed by | Multiverse Computing |
|
||||||
|
| License | Apache 2.0 |
|
||||||
|
| Contact | [business@multiversecomputing.com](mailto:business@multiversecomputing.com) |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
|
||||||
|
If you use this model, please cite the base model and this variant:
|
||||||
|
|
||||||
|
```bibtex
|
||||||
|
@misc{qwen3technicalreport,
|
||||||
|
title = {Qwen3 Technical Report},
|
||||||
|
author = {Qwen Team},
|
||||||
|
year = {2025},
|
||||||
|
eprint = {2505.09388},
|
||||||
|
archivePrefix = {arXiv},
|
||||||
|
primaryClass = {cs.CL},
|
||||||
|
url = {https://arxiv.org/abs/2505.09388}
|
||||||
|
}
|
||||||
|
@misc{littlelamb,
|
||||||
|
title = {LittleLamb: Compressed Qwen3-0.6B via CompactifAI},
|
||||||
|
author = {Multiverse Computing},
|
||||||
|
year = {2026},
|
||||||
|
url = {https://huggingface.co/MultiverseComputingCAI/LittleLamb},
|
||||||
|
note = {Model developed based on Qwen/Qwen3-0.6B using CompactifAI technology}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Built by [Multiverse Computing](https://www.multiversecomputing.com)** · [Report an issue](https://huggingface.co/MultiverseComputingCAI/LittleLamb/discussions) · [Discord](https://discord.gg/cGas9uStqp)
|
||||||
28
added_tokens.json
Normal file
28
added_tokens.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"</think>": 151668,
|
||||||
|
"</tool_call>": 151658,
|
||||||
|
"</tool_response>": 151666,
|
||||||
|
"<think>": 151667,
|
||||||
|
"<tool_call>": 151657,
|
||||||
|
"<tool_response>": 151665,
|
||||||
|
"<|box_end|>": 151649,
|
||||||
|
"<|box_start|>": 151648,
|
||||||
|
"<|endoftext|>": 151643,
|
||||||
|
"<|file_sep|>": 151664,
|
||||||
|
"<|fim_middle|>": 151660,
|
||||||
|
"<|fim_pad|>": 151662,
|
||||||
|
"<|fim_prefix|>": 151659,
|
||||||
|
"<|fim_suffix|>": 151661,
|
||||||
|
"<|im_end|>": 151645,
|
||||||
|
"<|im_start|>": 151644,
|
||||||
|
"<|image_pad|>": 151655,
|
||||||
|
"<|object_ref_end|>": 151647,
|
||||||
|
"<|object_ref_start|>": 151646,
|
||||||
|
"<|quad_end|>": 151651,
|
||||||
|
"<|quad_start|>": 151650,
|
||||||
|
"<|repo_name|>": 151663,
|
||||||
|
"<|video_pad|>": 151656,
|
||||||
|
"<|vision_end|>": 151653,
|
||||||
|
"<|vision_pad|>": 151654,
|
||||||
|
"<|vision_start|>": 151652
|
||||||
|
}
|
||||||
3
assets/littlelamb-intelligence-nothinking-family.png
Normal file
3
assets/littlelamb-intelligence-nothinking-family.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:363c208fa0e64b146cb094809715453e72c333a32ba22e7973e645e12c824376
|
||||||
|
size 178075
|
||||||
3
assets/littlelamb-intelligence-thinking-family.png
Normal file
3
assets/littlelamb-intelligence-thinking-family.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a3645e24d150647de6c857c3a1f213ef1473ba45c45087fbae41965fcfc56bea
|
||||||
|
size 166449
|
||||||
3
assets/littlelamb-performance-family.png
Normal file
3
assets/littlelamb-performance-family.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:97f91e9b4db3bae09bd11c001f6548d9d774ab48253adcfcd70a557a5733d12d
|
||||||
|
size 388796
|
||||||
89
chat_template.jinja
Normal file
89
chat_template.jinja
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
{%- if tools %}
|
||||||
|
{{- '<|im_start|>system\n' }}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{{- messages[0].content + '\n\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{{- "\n" }}
|
||||||
|
{{- tool | tojson }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||||
|
{%- else %}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
||||||
|
{%- for message in messages[::-1] %}
|
||||||
|
{%- set index = (messages|length - 1) - loop.index0 %}
|
||||||
|
{%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
|
||||||
|
{%- set ns.multi_step_tool = false %}
|
||||||
|
{%- set ns.last_query_index = index %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if message.content is string %}
|
||||||
|
{%- set content = message.content %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set content = '' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
||||||
|
{%- elif message.role == "assistant" %}
|
||||||
|
{%- set reasoning_content = '' %}
|
||||||
|
{%- if message.reasoning_content is string %}
|
||||||
|
{%- set reasoning_content = message.reasoning_content %}
|
||||||
|
{%- else %}
|
||||||
|
{%- if '</think>' in content %}
|
||||||
|
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
||||||
|
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if loop.index0 > ns.last_query_index %}
|
||||||
|
{%- if loop.last or (not loop.last and reasoning_content) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if message.tool_calls %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if (loop.first and content) or (not loop.first) %}
|
||||||
|
{{- '\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if tool_call.function %}
|
||||||
|
{%- set tool_call = tool_call.function %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<tool_call>\n{"name": "' }}
|
||||||
|
{{- tool_call.name }}
|
||||||
|
{{- '", "arguments": ' }}
|
||||||
|
{%- if tool_call.arguments is string %}
|
||||||
|
{{- tool_call.arguments }}
|
||||||
|
{%- else %}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '}\n</tool_call>' }}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- elif message.role == "tool" %}
|
||||||
|
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
||||||
|
{{- '<|im_start|>user' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- content }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|im_start|>assistant\n' }}
|
||||||
|
{%- if enable_thinking is defined and enable_thinking is false %}
|
||||||
|
{{- '<think>\n\n</think>\n\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
60
config.json
Normal file
60
config.json
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Qwen3ForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"eos_token_id": 151645,
|
||||||
|
"head_dim": 128,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 544,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 2560,
|
||||||
|
"layer_types": [
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention"
|
||||||
|
],
|
||||||
|
"max_position_embeddings": 40960,
|
||||||
|
"max_window_layers": 28,
|
||||||
|
"model_type": "qwen3",
|
||||||
|
"num_attention_heads": 16,
|
||||||
|
"num_hidden_layers": 28,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"rms_norm_eps": 1e-06,
|
||||||
|
"rope_scaling": null,
|
||||||
|
"rope_theta": 1000000,
|
||||||
|
"sliding_window": null,
|
||||||
|
"tie_word_embeddings": true,
|
||||||
|
"transformers_version": "4.57.1",
|
||||||
|
"use_cache": true,
|
||||||
|
"use_sliding_window": false,
|
||||||
|
"vocab_size": 151936
|
||||||
|
}
|
||||||
14
generation_config.json
Normal file
14
generation_config.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"do_sample": true,
|
||||||
|
"eos_token_id": [
|
||||||
|
151645,
|
||||||
|
151643
|
||||||
|
],
|
||||||
|
"pad_token_id": 151643,
|
||||||
|
"temperature": 0.6,
|
||||||
|
"top_k": 20,
|
||||||
|
"top_p": 0.95,
|
||||||
|
"transformers_version": "4.57.1",
|
||||||
|
"trust_remote_code": true
|
||||||
|
}
|
||||||
151388
merges.txt
Normal file
151388
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:f1b0a340a8f4cc335603c177ab1349b13646b6aa26c01ae2f88e368c482bfb66
|
||||||
|
size 586551888
|
||||||
31
special_tokens_map.json
Normal file
31
special_tokens_map.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<|im_start|>",
|
||||||
|
"<|im_end|>",
|
||||||
|
"<|object_ref_start|>",
|
||||||
|
"<|object_ref_end|>",
|
||||||
|
"<|box_start|>",
|
||||||
|
"<|box_end|>",
|
||||||
|
"<|quad_start|>",
|
||||||
|
"<|quad_end|>",
|
||||||
|
"<|vision_start|>",
|
||||||
|
"<|vision_end|>",
|
||||||
|
"<|vision_pad|>",
|
||||||
|
"<|image_pad|>",
|
||||||
|
"<|video_pad|>"
|
||||||
|
],
|
||||||
|
"eos_token": {
|
||||||
|
"content": "<|im_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"pad_token": {
|
||||||
|
"content": "<|endoftext|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
239
tokenizer_config.json
Normal file
239
tokenizer_config.json
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
{
|
||||||
|
"add_bos_token": false,
|
||||||
|
"add_prefix_space": false,
|
||||||
|
"added_tokens_decoder": {
|
||||||
|
"151643": {
|
||||||
|
"content": "<|endoftext|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151644": {
|
||||||
|
"content": "<|im_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151645": {
|
||||||
|
"content": "<|im_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151646": {
|
||||||
|
"content": "<|object_ref_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151647": {
|
||||||
|
"content": "<|object_ref_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151648": {
|
||||||
|
"content": "<|box_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151649": {
|
||||||
|
"content": "<|box_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151650": {
|
||||||
|
"content": "<|quad_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151651": {
|
||||||
|
"content": "<|quad_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151652": {
|
||||||
|
"content": "<|vision_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151653": {
|
||||||
|
"content": "<|vision_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151654": {
|
||||||
|
"content": "<|vision_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151655": {
|
||||||
|
"content": "<|image_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151656": {
|
||||||
|
"content": "<|video_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151657": {
|
||||||
|
"content": "<tool_call>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151658": {
|
||||||
|
"content": "</tool_call>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151659": {
|
||||||
|
"content": "<|fim_prefix|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151660": {
|
||||||
|
"content": "<|fim_middle|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151661": {
|
||||||
|
"content": "<|fim_suffix|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151662": {
|
||||||
|
"content": "<|fim_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151663": {
|
||||||
|
"content": "<|repo_name|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151664": {
|
||||||
|
"content": "<|file_sep|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151665": {
|
||||||
|
"content": "<tool_response>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151666": {
|
||||||
|
"content": "</tool_response>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151667": {
|
||||||
|
"content": "<think>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151668": {
|
||||||
|
"content": "</think>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<|im_start|>",
|
||||||
|
"<|im_end|>",
|
||||||
|
"<|object_ref_start|>",
|
||||||
|
"<|object_ref_end|>",
|
||||||
|
"<|box_start|>",
|
||||||
|
"<|box_end|>",
|
||||||
|
"<|quad_start|>",
|
||||||
|
"<|quad_end|>",
|
||||||
|
"<|vision_start|>",
|
||||||
|
"<|vision_end|>",
|
||||||
|
"<|vision_pad|>",
|
||||||
|
"<|image_pad|>",
|
||||||
|
"<|video_pad|>"
|
||||||
|
],
|
||||||
|
"bos_token": null,
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<|im_end|>",
|
||||||
|
"errors": "replace",
|
||||||
|
"extra_special_tokens": {},
|
||||||
|
"model_max_length": 131072,
|
||||||
|
"pad_token": "<|endoftext|>",
|
||||||
|
"split_special_tokens": false,
|
||||||
|
"tokenizer_class": "Qwen2Tokenizer",
|
||||||
|
"unk_token": null
|
||||||
|
}
|
||||||
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