Ling: A MoE LLM Provided and Open-sourced by InclusionAI
Captured source
source ↗Ling: A MoE LLM Provided and Open-sourced by InclusionAI | INCLUSION AI
Skip to main content 🤗 Hugging Face    |   🤖 ModelScope
Introduction
Ling is a MoE LLM provided and open-sourced by InclusionAI. We introduce two different sizes, which are Ling-lite and Ling-plus. Ling-lite has 16.8 billion parameters with 2.75 billion activated parameters, while Ling-plus has 290 billion parameters with 28.8 billion activated parameters. Both models demonstrate impressive performance compared to existing models in the industry.
Their structure makes it easy to scale up and down and adapt to different tasks, so users can use these models for a wide range of tasks, from processing natural language to solving complex problems. Furthermore, the open-source nature of Ling promotes collaboration and innovation within the AI community, fostering a diverse range of use cases and enhancements.
As more developers and researchers engage with the platform, we can expect rapid advancements and improvements, leading to even more sophisticated applications. This collaborative approach accelerates development and ensures that the models remain at the forefront of technology, addressing emerging challenges in various fields.
Update
[2025-5-10] Ling-lite-1.5 has been released! It achieves significant progress in reasoning ability compared with previous Ling-lite.
[2025-4-15] Ling-lite is upgraded to Ling-lite-0415. The new model demonstrates notable improvements over its predecessor, Ling-lite-0220, especially on code and math.
Model Downloads
You can download the following table to see the various parameters for your use case. If you are located in mainland China, we also provide the model on ModelScope.cn to speed up the download process.
Model #Total Params #Activated Params Context Length Download Ling-lite-base-1.5 16.8B 2.75B 128K 🤗 HuggingFace 🤖 ModelScope Ling-lite-1.5 16.8B 2.75B 128K 🤗 HuggingFace 🤖 ModelScope Ling-plus-base 290B 28.8B 64K 🤗 HuggingFace 🤖 ModelScope Ling-plus 290B 28.8B 64K 🤗 HuggingFace 🤖 ModelScope Ling-coder-lite-base 16.8B 2.75B 16K 🤗 HuggingFace 🤖 ModelScope Ling-coder-lite 16.8B 2.75B 16K 🤗 HuggingFace 🤖 ModelScope
Note: If you are interested in previous version, please visit the past model collections in Huggingface or ModelScope .
Evaluation
Ling-lite
Standard Benchmarks
Benchmark #shots Ling-lite-1.5 Ling-lite Qwen3-4B-Instruct Qwen3-8B-Instruct Moonlight-16B-A3B-Instruct LLaMA3.1-8B MMLU(EM) 5 74.33 71.27 70.09 75.97 70.74 68.67 GPQA(Pass@1) 0 36.55 29.73 40.4 47.10 19.51 27.59 HumanEval(Pass@1) 0 87.27 84.38 81.94 85.29 72.94 67.23 LiveCodeBench 2408-2502 (Pass@1) 0 22.7 18.94 21.8 26.88 14.76 18.41 LCBench(pass@1) 0 60.37 46.57 48.61 60.03 28.39 23.13 Math(EM) 0 82.62 72.80 81.46 82.70 67.1 52.42 AIME2024(pass@1) 0 21.88 10.21 20.62 26.25 6.88 7.29 OlympiadBench(pass@1) 0 52.30 36.44 54.33 56.11 32.85 17.04 BBH(EM) 0 75.75 66.38 78.21 79.33 63.45 68.05 IFEval(Prompt Strict) 0 77.70 77.99 81.06 83.55 49.01 73.01 BFCL_live 0 72.15 67.93 65.35 69.83 47.14 49.98
Context Window
Evaluation results on the Needle In A Haystack (NIAH) tests. Ling-lite-1.5 has improved long text generation capability and performs well across most context window lengths up to 128K .
Quickstart
🤗 Hugging Face Transformers
Here is a code snippet to show you how to use the chat model with transformers :
from transformers import AutoModelForCausalLM , AutoTokenizer
model_name = "inclusionAI/Ling-lite-1.5"
model = AutoModelForCausalLM . from_pretrained ( model_name , torch_dtype = "auto" , device_map = "auto" ) tokenizer = AutoTokenizer . from_pretrained ( model_name )
prompt = "Give me a short introduction to large language models." messages = [ { "role" : "system" , "content" : "You are Ling, an assistant created by inclusionAI" } , { "role" : "user" , "content" : prompt } ] text = tokenizer . apply_chat_template ( messages , tokenize = False , add_generation_prompt = True ) model_inputs = tokenizer ( [ text ] , return_tensors = "pt" ) . to ( model . device )
generated_ids = model . generate ( ** model_inputs , max_new_tokens = 512 ) generated_ids = [ output_ids [ len ( input_ids ) : ] for input_ids , output_ids in zip ( model_inputs . input_ids , generated_ids ) ]
response = tokenizer . batch_decode ( generated_ids , skip_special_tokens = True ) [ 0 ]
🤖 ModelScope
If you're in mainland China, we strongly recommend you to use our model from 🤖 ModelScope .
Deployment
vLLM
vLLM supports offline batched inference or launching an OpenAI-Compatible API Service for online inference.
Environment Preparation
Since the Pull Request (PR) has not been submitted to the vLLM community at this stage, please prepare the environment by following the steps below:
git clone -b v0.7.3 https://github.com/vllm-project/vllm.git cd vllm git apply Ling/inference/vllm/bailing_moe.patch pip install -e .
Offline Inference:
from transformers import AutoTokenizer from vllm import LLM, SamplingParams
tokenizer = AutoTokenizer.from_pretrained ( "inclusionAI/Ling-lite-1.5" )
sampling_params = SamplingParams ( temperature = 0.7 , top_p = 0.8 , repetition_penalty = 1.05 , max_tokens = 16384 )
llm = LLM ( model = "inclusionAI/Ling-lite" , dtype = 'bfloat16' ) prompt = "Give me a short introduction to large language models." messages = [ { "role" : "system" , "content" : "You are Ling, an assistant created by inclusionAI" } , { "role" : "user" , "content" : prompt } ]
text = tokenizer.apply_chat_template ( messages, tokenize = False, add_generation_prompt = True ) outputs = llm.generate ( [ text ] , sampling_params )
Online Inference:
vllm serve inclusionAI/Ling-lite \ --tensor-parallel-size 2 \ --pipeline-parallel-size 1 \ --use-v2-block-manager \ --gpu-memory-utilization 0.90
To handle long context in vLLM using YaRN, we need to follow these two steps:
Add a rope_scaling field to the model's config.json file, for example:
{ ... , "rope_scaling" : { "factor" : 4.0 , "original_max_position_embeddings" : 32768 , "type" : "yarn" } }
Use an additional parameter --max-model-len to specify the desired maximum context length when starting the vLLM service.
For detailed guidance, please refer to the vLLM instructions .
MindIE
This subject outlines the primary processes for executing a Ling MoE model with specified hardware and the MindIE inference framework.
Configure preparation
Create a model…
Excerpt shown — open the source for the full document.
Notability
notability 7.0/10New open-source MoE LLM release.