Today, __Ling-flash-2.0__ is officially open-sourced! ๐ Following the release of the __language model Ling-mini-2.0__ and the __thinking model Ring-mini-2.0__, we are now open-sourcing the third MoE LLM under the __Ling 2.0 architecture: Ling-flash-2.0__, a language model with __100B total parameters__ and __6.1B activated parameters (4.8B non-embedding)__. Trained on __20T+ tokens of high-quality data__, together with __supervised fine-tuning__ and __multi-stage reinforcement learning__, Ling-flash-2.0 achieves __SOTA performance among dense models under 40B parameters__, despite activating only ~6B parameters. Compared to MoE models with larger activation/total parameters, it also demonstrates strong competitiveness. Notably, it delivers outstanding performance in __complex reasoning, code generation, and frontend development__.
Guided by Ling Scaling Laws, Ling 2.0 adopts a __1/32 activation-ratio MoE architecture__, optimized across multiple design choices: expert granularity, shared-expert ratio, attention balance, __aux-loss-free + sigmoid routing strategy__, MTP layers, QK-Norm, Partial-RoPE, and more. These refinements enable __small-activation MoE__ models to achieve __7ร efficiency gains__ over equivalent dense architectures. In other words, with just __6.1B activated parameters (4.8B non-embedding)__, __Ling-flash-2.0__ can match the performance of ~40B dense models. Thanks to its small activation size, it also delivers major inference speed advantages:
On __H20 hardware__, Ling-flash-2.0 achieves __200+ tokens/s__, offering __3ร speedups__ compared to 36B dense models in everyday use.
With __YaRN extrapolation__, it supports __128K context length__, and as output length grows, its relative speedup can reach __7ร or more__.
You can download the following table to see the various stage of Ling-flash-2.0 models. If you are located in mainland China, we also provide the model on ModelScope.cn to speed up the download process.
from vllm import LLM, SamplingParams
sampling_params = SamplingParams(temperature=0.7, top_p=0.8, repetition_penalty=1.05, max_tokens=16384)
llm = LLM(model="inclusionAI/Ling-flash-base-2.0", dtype='bfloat16')
text = "What is the capital of France?"
outputs = llm.generate([text], sampling_params)
BF16 and FP8 models are supported by SGLang now, it depends on the dtype of the model in ${MODEL_PATH}. They both share the same command in the following:
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("inclusionAI/Ling-flash-base-2.0", revision="d211f3809e93cb1edf68aa2de80f5ad7f573d0dd")
model = AutoModelForCausalLM.from_pretrained("inclusionAI/Ling-flash-base-2.0", revision="d211f3809e93cb1edf68aa2de80f5ad7f573d0dd", device_map="auto")