Text Generation
Transformers.js
ONNX
ONNX Runtime GenAI
qwen3_5_text
webgpu
onnxruntime
q4
q4f16
int4
cuda
Mixture of Experts
conversational
Run this model with HF Jobs
Run webbrain-one/Ling-3.0-tiny-ONNX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/webbrain-one/Ling-3.0-tiny-ONNX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/webbrain-one/Ling-3.0-tiny-ONNX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/webbrain-one/Ling-3.0-tiny-ONNX. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use webbrain-one/Ling-3.0-tiny-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use webbrain-one/Ling-3.0-tiny-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'webbrain-one/Ling-3.0-tiny-ONNX'); - ONNX Runtime GenAI
How to use webbrain-one/Ling-3.0-tiny-ONNX with ONNX Runtime GenAI:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse filesFiles changed (10)
- .gitattributes+3
- README.md+121-80
- SHA256SUMS+4
- config.json+126-1
- config_bailing_original.jsonAdded+83
- onnx/model_q4f16.onnxAdded+3
- onnx/model_q4f16.onnx_dataAdded+3
- onnx/model_q4f16.onnx_data_1Added+3
- onnx/model_q4f16.onnx_data_2Added+3
- tokenizer_config.json+2-1
34 unmodified lines35363734 unmodified lines*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textmodel.onnx.data filter=lfs diff=lfs merge=lfs -text34 unmodified lines35363738394034 unmodified lines*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textmodel.onnx.data filter=lfs diff=lfs merge=lfs -textonnx/model_q4f16.onnx_data_1 filter=lfs diff=lfs merge=lfs -textonnx/model_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -textonnx/model_q4f16.onnx_data_2 filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222 unmodified lines252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475761 unmodified line78798081828384858687888990912 unmodified lines949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159---license: mitbase_model: inclusionAI/Ling-3.0-tinylibrary_name: onnxruntimepipeline_tag: text-generationtags:- onnx- onnxruntime- onnxruntime-genai- q4- int4- cuda- moe- text-generation---# Ling-3.0-tiny ONNX — Q4 CUDACUDA-targeted ONNX Runtime GenAI conversion of[`inclusionAI/Ling-3.0-tiny`](https://huggingface.co/inclusionAI/Ling-3.0-tiny),a 7.9B-total / 1.3B-active-parameter hybrid reasoning MoE model.2 unmodified lines> release. Read the [original model card](https://huggingface.co/inclusionAI/Ling-3.0-tiny)> for training, evaluation, intended use, and base-model limitations.| Item | Value ||---|---|| Base model | [`inclusionAI/Ling-3.0-tiny`](https://huggingface.co/inclusionAI/Ling-3.0-tiny) || Runtime | ONNX Runtime GenAI with CUDA || Quantization | Q4 weight-only, block size 32 || Activations / cache | FP16 || Router math | FP32 || Context length | 131,072 tokens, subject to available VRAM || Download size | 4.849 GB / 4.516 GiB |## Architecture preservedThe conversion keeps Ling's hybrid architecture rather than replacing itsspecialized layers with dense approximations:- 18 Kimi Delta Attention (KDA) layers with recurrent and convolution state- 6 Multi-Latent Attention (MLA) layers with KV cache- 23 sparse MoE layers with 128 routed experts, top-8 group-limited routing,expert bias, and one shared expert- one dense MLP layer at the start of the decoderThe graph uses CUDA `MatMulNBits`, `QMoE`, `LinearAttention`,`CausalConvWithState`, and `GroupQueryAttention` operators. `model.onnx` and`model.onnx.data` form one model and must remain in the same directory.## InstallPython 3.10 or newer is recommended. This graph requires ONNX Runtime 1.28.0+and ONNX Runtime GenAI 0.15.2+.```bashpip install "onnxruntime-gpu>=1.28.0" \"onnxruntime-genai-cuda>=0.15.2" \"transformers>=4.57,<5"```Download all repository files into one directory:```bashpip install -U "huggingface_hub[cli]"hf download webbrain-one/Ling-3.0-tiny-ONNX \--local-dir Ling-3.0-tiny-ONNX```## Run with Python```pythonimport numpy as npimport onnxruntime_genai as og1 unmodified linemodel_dir = "Ling-3.0-tiny-ONNX"model = og.Model(model_dir)tokenizer = AutoTokenizer.from_pretrained(model_dir,trust_remote_code=True,)messages = [{"role": "user", "content": "Explain why the sky is blue."}]input_ids = tokenizer.apply_chat_template(messages,add_generation_prompt=True,tokenize=True,return_tensors="np",2 unmodified linesparams = og.GeneratorParams(model)params.set_search_options(max_length=int(input_ids.shape[-1]) + 256,do_sample=False,)generator = og.Generator(model, params)generator.append_tokens(np.asarray(input_ids[0], dtype=np.int32))prompt_length = int(input_ids.shape[-1])while not generator.is_done():generator.generate_next_token()generated = generator.get_sequence(0)[prompt_length:]print(tokenizer.decode(generated, skip_special_tokens=True))```Set `enable_thinking=True` to use the base model's reasoning mode. The originalmodel card recommends `temperature=1.0`, `top_p=0.95`, and `top_k=20` forthinking-mode sampling.## Quantization details- Dense linear weights: symmetric Q4, block size 32 (`MatMulNBits`)- Routed expert weights: symmetric Q4, block size 32 (`QMoE`)- Embeddings, activations, and recurrent/KV cache states: FP16- MoE router weights and routing math: FP32 to preserve expert selection- ONNX graph: 235 Q4 `MatMulNBits`, 23 Q4 `QMoE`, 18 `LinearAttention`,18 `CausalConvWithState`, and 6 `GroupQueryAttention` nodesRuntime memory is higher than the download size because CUDA kernels, weightprepacking, activations, recurrent state, and the KV cache also consume VRAM.## ValidationThe complete artifact was loaded and generated with ONNX Runtime GenAI 0.15.2and ONNX Runtime GPU 1.28.0 on an NVIDIA GeForce RTX 5090. A deterministicshort-prompt smoke test completed successfully. This confirms full graph load,tokenizer/chat-template integration, recurrent-state discovery, cache handling,and execution of the hybrid Q4 CUDA graph.File hashes are included in `SHA256SUMS`. On Linux, verify the two graph fileswith:```bashsha256sum -c SHA256SUMS```## Limitations- This graph targets the CUDA execution provider and uses ONNX Runtime contriboperators that older runtime versions do not provide.- Q4 quantization can change outputs and quality relative to the original BF16checkpoint. No benchmark parity claim is made here.- The advertised context length is architectural; practical context is limitedby available VRAM and workload settings.- Only a functional smoke test was performed for this conversion. It is not asubstitute for the original model's evaluation suite.## Attribution and licenseThe model architecture, checkpoint, tokenizer, and chat template are by[inclusionAI](https://huggingface.co/inclusionAI). This conversion retains thebase model's MIT license. Please cite and credit the original project when usingor redistributing this artifact.123456789101112131415161718192021222324252 unmodified lines2829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241 unmodified line1261271281291301311321331341352 unmodified lines138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200---license: mitbase_model: inclusionAI/Ling-3.0-tinylibrary_name: transformers.jspipeline_tag: text-generationtags:- onnx- transformers.js- webgpu- onnxruntime- onnxruntime-genai- q4- q4f16- int4- cuda- moe- text-generation---# Ling-3.0-tiny ONNX — Q4 WebGPU + CUDACommunity ONNX conversion of[`inclusionAI/Ling-3.0-tiny`](https://huggingface.co/inclusionAI/Ling-3.0-tiny),a 7.9B-total / 1.3B-active-parameter hybrid reasoning MoE model.2 unmodified lines> release. Read the [original model card](https://huggingface.co/inclusionAI/Ling-3.0-tiny)> for training, evaluation, intended use, and base-model limitations.| Target | Files | Runtime | Download ||---|---|---|---:|| Browser WebGPU | `onnx/model_q4f16.onnx` + 3 data shards | Transformers.js 4.2+ | 4.849 GB / 4.516 GiB || NVIDIA CUDA | `model.onnx` + `model.onnx.data` | ONNX Runtime GenAI | 4.849 GB / 4.516 GiB |The WebGPU layout follows the standard Transformers.js `q4f16` contract usedby browser-oriented ONNX repositories: the graph is under `onnx/`, externaltensor data is split into three sub-2 GB files, activations and cache are FP16,and hybrid recurrent-cache names use the Qwen3.5-compatible convention alreadysupported by Transformers.js.## Run in the browser with WebGPUInstall Transformers.js 4.2 or newer:```bashnpm install "@huggingface/transformers@^4.2.0"``````javascriptimport { pipeline, TextStreamer } from '@huggingface/transformers';const generator = await pipeline('text-generation','webbrain-one/Ling-3.0-tiny-ONNX',{device: 'webgpu',dtype: 'q4f16',},);const messages = [{ role: 'user', content: 'Explain why the sky is blue in two sentences.' },];const output = await generator(messages, {max_new_tokens: 128,do_sample: false,tokenizer_encode_kwargs: { enable_thinking: false },streamer: new TextStreamer(generator.tokenizer, {skip_prompt: true,skip_special_tokens: true,}),});console.log(output[0].generated_text.at(-1)?.content);```For thinking mode, set `enable_thinking: true`. The original model cardrecommends `temperature: 1.0`, `top_p: 0.95`, and `top_k: 20` when sampling inthinking mode.### Browser requirements- A current desktop browser with WebGPU enabled; Chrome or Edge is recommended.- Approximately 4.85 GB of model downloads on first load, plus browser cache.- Enough GPU memory for all weights, runtime buffers, state, and the requestedcontext. The 1.3B active-parameter figure reduces compute, but all 7.9B modelparameters still need to be stored.- Start with a short prompt and modest `max_new_tokens`, then increase contextafter confirming memory use on the target device.This graph depends on WebGPU implementations of `MatMulNBits`, `QMoE`,`LinearAttention`, `CausalConvWithState`, and `GroupQueryAttention`. It is not aWASM/CPU fallback model.## Use from WebBrainUse the same repository ID and standard Transformers.js settings:```textmodel: webbrain-one/Ling-3.0-tiny-ONNXdevice: webgpudtype: q4f16task: text-generation```WebBrain should select `onnx/model_q4f16.onnx` and fetch the three external-datafiles declared by `config.json`.## Run the CUDA variant with PythonThe repository also retains the separately validated CUDA-targeted ONNX RuntimeGenAI graph.```bashpip install "onnxruntime-gpu>=1.28.0" \"onnxruntime-genai-cuda>=0.15.2" \"transformers>=4.57,<5"``````pythonimport numpy as npimport onnxruntime_genai as og1 unmodified linemodel_dir = "Ling-3.0-tiny-ONNX"model = og.Model(model_dir)tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)input_ids = tokenizer.apply_chat_template([{"role": "user", "content": "Explain why the sky is blue."}],add_generation_prompt=True,tokenize=True,return_tensors="np",2 unmodified linesparams = og.GeneratorParams(model)params.set_search_options(max_length=int(input_ids.shape[-1]) + 128,do_sample=False,)generator = og.Generator(model, params)generator.append_tokens(np.asarray(input_ids[0], dtype=np.int32))prompt_length = int(input_ids.shape[-1])while not generator.is_done():generator.generate_next_token()print(tokenizer.decode(generator.get_sequence(0)[prompt_length:], skip_special_tokens=True))```## Architecture and quantization- 18 Kimi Delta Attention layers with recurrent and convolution state- 6 Multi-Latent Attention layers with KV cache- 23 sparse MoE layers with 128 routed experts, top-8 group-limited routing,expert bias, and one shared expert- one dense MLP layer at the start of the decoder- symmetric Q4/block-32 dense and routed-expert weights- FP16 embeddings, activations, recurrent state, and KV cache- FP32 MoE router weights and routing mathThe ONNX graph contains 235 `MatMulNBits`, 23 `QMoE`, 18 `LinearAttention`,18 `CausalConvWithState`, and 6 `GroupQueryAttention` nodes.## Validation- The complete CUDA artifact generated successfully on an NVIDIA GeForce RTX5090 with ONNX Runtime GenAI 0.15.2 and ONNX Runtime GPU 1.28.0.- The WebGPU repack was verified tensor-for-tensor against the CUDA graph; all4,835,749,912 external tensor bytes are identical.- Transformers.js 4.2.0 loads the config, dispatches `Qwen3_5ForCausalLM`, findsall 18 recurrent/conv caches and 6 attention caches, and applies the originalLing tokenizer/chat template.- Browser WebGPU generation validation is required before treating this variantas production-ready.## Limitations- Q4 quantization can change outputs and quality relative to the original BF16checkpoint. No benchmark parity claim is made here.- Browser support, GPU limits, shader compilation time, and memory behavior varyby operating system, browser version, and GPU driver.- The advertised 131,072-token context is architectural; practical browsercontext is limited by available GPU memory.- The WebGPU config uses Transformers.js's existing `qwen3_5_text` hybrid-cacheadapter solely as a runtime compatibility layer. The underlying graph andweights remain Ling/Bailing Hybrid, preserved in`config_bailing_original.json`.## Attribution and licenseThe model architecture, checkpoint, tokenizer, and chat template are by[`inclusionAI`](https://huggingface.co/inclusionAI). This conversion retains thebase model's MIT license. Please cite and credit the[original Ling-3.0-tiny release](https://huggingface.co/inclusionAI/Ling-3.0-tiny)when using or redistributing this artifact.
12cdd5029c67a427156a92938f8389482e597324f05ff1b08b364e473b9e75da11 model.onnx172b0b42e7cca0df85ada36b05d554a3a5a3fd5ad48492ae55b651c1684d796e model.onnx.data123456cdd5029c67a427156a92938f8389482e597324f05ff1b08b364e473b9e75da11 model.onnx172b0b42e7cca0df85ada36b05d554a3a5a3fd5ad48492ae55b651c1684d796e model.onnx.datae5061a07964a9eb4ce3744b66781ceecae0fd8a18f75a8de87836a0be1ba75d5 onnx/model_q4f16.onnx6b507c4b84ee133d5dedf4ad2fda48119628d8637f0e502adf7182b9d9f72c3d onnx/model_q4f16.onnx_datade1da14397accd5b2470a0877fd4c4f4a703131feb1267e5686ff8091a8030c6 onnx/model_q4f16.onnx_data_1edba67f32660ad177bfad6dc7f42bef0e5606cef96bfa51040aad550d2a24eb9 onnx/model_q4f16.onnx_data_2
1{"architectures": ["BailingMoeV3ForCausalLM"], "attention_dropout": 0.0, "auto_map": {"AutoConfig": "configuration_bailing_moe_v3.BailingMoeV3Config", "AutoModel": "modeling_bailing_moe_v3.BailingMoeV3Model", "AutoModelForCausalLM": "modeling_bailing_moe_v3.BailingMoeV3ForCausalLM"}, "embedding_dropout": 0.0, "eos_token_id": 156895, "expert_swiglu_limit_list": null, "first_k_dense_replace": 1, "gated_attention_proj_granularity_type": "head_wise", "group_norm_size": 1, "head_dim": 128, "hidden_act": "silu", "hidden_size": 1536, "initializer_range": 0.02, "intermediate_size": 4608, "kda_lower_bound": -5, "kda_safe_gate": true, "kv_lora_rank": 512, "layer_group_size": 4, "linear_silu": true, "max_position_embeddings": 131072, "max_window_layers": 20, "moe_intermediate_size": 512, "moe_router_enable_expert_bias": true, "moe_shared_expert_intermediate_size": 512, "mtp_loss_scaling_factor": 0, "mtp_use_kda": false, "n_group": 8, "no_kda_lora": true, "norm_topk_prob": true, "num_attention_heads": 16, "num_experts": 128, "num_experts_per_tok": 8, "num_hidden_layers": 24, "num_key_value_heads": 16, "num_kv_heads_for_linear_attn": 0, "num_nextn_predict_layers": 0, "num_shared_experts": 1, "output_dropout": 0.0, "output_router_logits": false, "pad_token_id": 156892, "partial_rotary_factor": 0.5, "q_lora_rank": 256, "qk_head_dim": 192, "qk_nope_head_dim": 128, "qk_rope_head_dim": 64, "rms_norm_eps": 1e-06, "rope_interleave": true, "rope_scaling": null, "rope_theta": 6000000, "rotary_dim": 64, "routed_scaling_factor": 2.5, "router_dtype": "fp32", "scale_router_input": false, "score_function": "sigmoid", "scoring_func": "sigmoid", "seq_aux": true, "share_expert_swiglu_limit_list": null, "short_conv_kernel_size": 4, "tie_word_embeddings": false, "topk_group": 4, "topk_method": "noaux_tc", "transformers_version": "4.45.0", "up_proj_norm": false, "use_bias": false, "use_cache": true, "use_kda_lora": false, "use_mla_nope": false, "use_nGPT": false, "use_qk_norm": true, "use_qkv_bias": false, "v_head_dim": 128, "value_norm": false, "vocab_size": 157184, "model_type": "bailing_hybrid", "torch_dtype": "bfloat16"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126{"architectures": ["Qwen3_5ForCausalLM"],"attention_dropout": 0.0,"embedding_dropout": 0.0,"eos_token_id": 156895,"expert_swiglu_limit_list": null,"first_k_dense_replace": 1,"gated_attention_proj_granularity_type": "head_wise","group_norm_size": 1,"head_dim": 192,"hidden_act": "silu","hidden_size": 1536,"initializer_range": 0.02,"intermediate_size": 4608,"kda_lower_bound": -5,"kda_safe_gate": true,"kv_lora_rank": 512,"layer_group_size": 4,"linear_silu": true,"max_position_embeddings": 131072,"max_window_layers": 20,"moe_intermediate_size": 512,"moe_router_enable_expert_bias": true,"moe_shared_expert_intermediate_size": 512,"mtp_loss_scaling_factor": 0,"mtp_use_kda": false,"n_group": 8,"no_kda_lora": true,"norm_topk_prob": true,"num_attention_heads": 16,"num_experts": 128,"num_experts_per_tok": 8,"num_hidden_layers": 24,"num_key_value_heads": 16,"num_kv_heads_for_linear_attn": 0,"num_nextn_predict_layers": 0,"num_shared_experts": 1,"output_dropout": 0.0,"output_router_logits": false,"pad_token_id": 156892,"partial_rotary_factor": 0.3333333333333333,"q_lora_rank": 256,"qk_head_dim": 192,"qk_nope_head_dim": 128,"qk_rope_head_dim": 64,"rms_norm_eps": 1e-06,"rope_interleave": true,"rope_scaling": null,"rope_theta": 6000000,"rotary_dim": 64,"routed_scaling_factor": 2.5,"router_dtype": "fp32","scale_router_input": false,"score_function": "sigmoid","scoring_func": "sigmoid","seq_aux": true,"share_expert_swiglu_limit_list": null,"short_conv_kernel_size": 4,"tie_word_embeddings": false,"topk_group": 4,"topk_method": "noaux_tc","transformers_version": "4.45.0","up_proj_norm": false,"use_bias": false,"use_cache": true,"use_kda_lora": false,"use_mla_nope": false,"use_nGPT": false,"use_qk_norm": true,"use_qkv_bias": false,"v_head_dim": 128,"value_norm": false,"vocab_size": 157184,"model_type": "qwen3_5_text","torch_dtype": "bfloat16","dtype": "float16","full_attention_interval": 4,"layer_types": ["linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention","linear_attention","linear_attention","linear_attention","full_attention"],"linear_conv_kernel_dim": 4,"linear_key_head_dim": 128,"linear_value_head_dim": 128,"linear_num_key_heads": 16,"linear_num_value_heads": 16,"mamba_ssm_dtype": "float16","rope_parameters": {"mrope_interleaved": true,"partial_rotary_factor": 0.3333333333333333,"rope_theta": 6000000,"rope_type": "default"},"transformers.js_config": {"use_external_data_format": {"model_q4f16.onnx": 3},"kv_cache_dtype": {"q4f16": "float16"}}}
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283{ "architectures": [ "BailingMoeV3ForCausalLM" ], "attention_dropout": 0.0, "auto_map": { "AutoConfig": "configuration_bailing_moe_v3.BailingMoeV3Config", "AutoModel": "modeling_bailing_moe_v3.BailingMoeV3Model", "AutoModelForCausalLM": "modeling_bailing_moe_v3.BailingMoeV3ForCausalLM" }, "embedding_dropout": 0.0, "eos_token_id": 156895, "expert_swiglu_limit_list": null, "first_k_dense_replace": 1, "gated_attention_proj_granularity_type": "head_wise", "group_norm_size": 1, "head_dim": 128, "hidden_act": "silu", "hidden_size": 1536, "initializer_range": 0.02, "intermediate_size": 4608, "kda_lower_bound": -5, "kda_safe_gate": true, "kv_lora_rank": 512, "layer_group_size": 4, "linear_silu": true, "max_position_embeddings": 131072, "max_window_layers": 20, "moe_intermediate_size": 512, "moe_router_enable_expert_bias": true, "moe_shared_expert_intermediate_size": 512, "mtp_loss_scaling_factor": 0, "mtp_use_kda": false, "n_group": 8, "no_kda_lora": true, "norm_topk_prob": true, "num_attention_heads": 16, "num_experts": 128, "num_experts_per_tok": 8, "num_hidden_layers": 24, "num_key_value_heads": 16, "num_kv_heads_for_linear_attn": 0, "num_nextn_predict_layers": 0, "num_shared_experts": 1, "output_dropout": 0.0, "output_router_logits": false, "pad_token_id": 156892, "partial_rotary_factor": 0.5, "q_lora_rank": 256, "qk_head_dim": 192, "qk_nope_head_dim": 128, "qk_rope_head_dim": 64, "rms_norm_eps": 1e-06, "rope_interleave": true, "rope_scaling": null, "rope_theta": 6000000, "rotary_dim": 64, "routed_scaling_factor": 2.5, "router_dtype": "fp32", "scale_router_input": false, "score_function": "sigmoid", "scoring_func": "sigmoid", "seq_aux": true, "share_expert_swiglu_limit_list": null, "short_conv_kernel_size": 4, "tie_word_embeddings": false, "topk_group": 4, "topk_method": "noaux_tc", "transformers_version": "4.45.0", "up_proj_norm": false, "use_bias": false, "use_cache": true, "use_kda_lora": false, "use_mla_nope": false, "use_nGPT": false, "use_qk_norm": true, "use_qkv_bias": false, "v_head_dim": 128, "value_norm": false, "vocab_size": 157184, "model_type": "bailing_hybrid", "torch_dtype": "bfloat16"}123version https://git-lfs.github.com/spec/v1oid sha256:e5061a07964a9eb4ce3744b66781ceecae0fd8a18f75a8de87836a0be1ba75d5size 811364123version https://git-lfs.github.com/spec/v1oid sha256:6b507c4b84ee133d5dedf4ad2fda48119628d8637f0e502adf7182b9d9f72c3dsize 1984862080123version https://git-lfs.github.com/spec/v1oid sha256:de1da14397accd5b2470a0877fd4c4f4a703131feb1267e5686ff8091a8030c6size 1943274240123version https://git-lfs.github.com/spec/v1oid sha256:edba67f32660ad177bfad6dc7f42bef0e5606cef96bfa51040aad550d2a24eb9size 9076139522109 unmodified lines211021112112211321142109 unmodified lines"model_max_length": 131072,"pad_token": "<|endoftext|>","tokenizer_class": "PreTrainedTokenizerFast","trust_remote_code": true}2109 unmodified lines2110211121122113211421152109 unmodified lines"model_max_length": 131072,"pad_token": "<|endoftext|>","tokenizer_class": "PreTrainedTokenizerFast","trust_remote_code": true,"chat_template": "{#- Bailing V3 chat template -#}\n{#- Supports: thinking option, tool calling -#}\n\n{#- ==================== thinking option normalization ==================== -#}\n{%- if enable_thinking is defined %}\n{%- if enable_thinking %}\n{%- set thinking_option = 'on' %}\n{%- else %}\n{%- set thinking_option = 'off' %}\n{%- endif %}\n{%- elif thinking_option is not defined %}\n{%- set thinking_option = 'on' %}\n{%- endif %}\n\n{#- ==================== preserved thinking ==================== -#}\n{% set preserved_thinking = true %}\n\n{#- ==================== system message ==================== -#}\n{{- '<role>SYSTEM</role>' }}\n{%- if tools %}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n' }}\n {%- endif %}\n {{- \"# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nIf none of the functions can be used, point it out. If the given question lacks the parameters required by the function, also point it out.\\nIf you need to use a function, for each function call, output the function name and arguments within the following XML format:\\n<tool_call>{function-name}\\n<arg_key>{arg-key-1}</arg_key>\\n<arg_value>{arg-value-1}</arg_value>\\n<arg_key>{arg-key-2}</arg_key>\\n<arg_value>{arg-value-2}</arg_value>\\n...\\n</tool_call>\\n\" }}\n {%- if messages[0].role == 'system' and messages[0].content is string and ('detailed thinking on' in messages[0].content or 'detailed thinking off' in messages[0].content) %}\n {{- '<|role_end|>' }}\n {%- else %}\n {{- 'detailed thinking ' + thinking_option + '<|role_end|>' }}\n {%- endif %}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {%- if 'detailed thinking on' in messages[0].content or 'detailed thinking off' in messages[0].content %}\n {{- messages[0].content + '<|role_end|>' }}\n {%- else %}\n {{- messages[0].content + '\\n' }}\n {{- 'detailed thinking ' + thinking_option + '<|role_end|>' }}\n {%- endif %}\n {% else %}\n {{- 'detailed thinking ' + thinking_option + '<|role_end|>' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- 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>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if message.role == \"user\" %}\n {{- '<role>HUMAN</role>' + message.content + '<|role_end|>' }}\n {%- elif message.role == \"system\" and not loop.first %}\n {{- '<role>SYSTEM</role>' + message.content + '<|role_end|>' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string and message.reasoning_content != '' %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if preserved_thinking or loop.index0 > ns.last_query_index %}\n {%- if reasoning_content != '' %}\n {{- '<role>ASSISTANT</role>' + '\\n<think>' + reasoning_content.strip('\\n') + '</think>' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<role>ASSISTANT</role>\\n<think></think>' + content }}\n {%- endif %}\n {%- else %}\n {{- '<role>ASSISTANT</role>\\n<think></think>' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- set tc = tool_call %}\n {%- if tool_call.function %}\n {%- set tc = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>' + tc.name }}\n {% set _args = tc.arguments %}\n {%- for k, v in _args.items() %}\n {{- '<arg_key>' + k + '</arg_key>' }}\n {{- '\\n<arg_value>' }}\n {%- if v is string %}\n {{- v }}\n {%- else %}\n {{- v | tojson(ensure_ascii=False) }}\n {%- endif %}\n {{- '</arg_value>' }}\n {%- endfor %}\n {{- '\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|role_end|>' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<role>OBSERVATION</role>' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|role_end|>' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n\n{#- ==================== generation prompt ==================== -#}\n{%- if add_generation_prompt %}\n {{- '<role>ASSISTANT</role>' }}\n {%- if thinking_option == 'on' %}\n {{- '\\n<think>' }}\n {%- elif thinking_option == 'off' %}\n {{- '\\n<think></think>' }}\n {%- endif %}\n{%- endif %}"}
.gitattributes+3
README.md+121-80
SHA256SUMS+4
config.json+126-1
config_bailing_original.jsonAdded+83
onnx/model_q4f16.onnxAdded+3
onnx/model_q4f16.onnx_dataAdded+3
onnx/model_q4f16.onnx_data_1Added+3
onnx/model_q4f16.onnx_data_2Added+3
tokenizer_config.json+2-1