sunnyj commited on
Commit
9d92469
·
verified ·
1 Parent(s): 0f4d504

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +117 -3
README.md CHANGED
@@ -1,3 +1,117 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: text-generation
4
+ library_name: transformers
5
+ ---
6
+
7
+ # Ling
8
+
9
+ [Paper](https://hf.co/papers/2503.05139)
10
+
11
+ <p align="center"><img src="https://huggingface.co/inclusionAI/Ling-lite/resolve/main/ant-bailing.png" width="100"/></p>
12
+
13
+ <p align="center">🤗 <a href="https://huggingface.co/inclusionAI">Hugging Face</a></p>
14
+
15
+ ## Introduction
16
+
17
+ 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.
18
+
19
+ 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.
20
+
21
+ 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.
22
+
23
+ ## Model Downloads
24
+
25
+ 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.
26
+
27
+
28
+
29
+ | **Model** | **#Total Params** | **#Activated Params** | **Context Length** | **Download** |
30
+ | :----------------: | :---------------: | :-------------------: | :----------------: | :----------: |
31
+ | Ling-lite-base-1.5 | 16.8B | 2.75B | 128K | [🤗 HuggingFace](https://huggingface.co/inclusionAI/Ling-lite-base-1.5) |
32
+ | Ling-lite-1.5 | 16.8B | 2.75B | 128K | [🤗 HuggingFace](https://huggingface.co/inclusionAI/Ling-lite-1.5) |
33
+
34
+
35
+
36
+ ## Evaluation
37
+
38
+ | **Benchmark** | **#shots** | **Ling-lite-1.5** | **Ling-lite** | **Qwen3-4B-Instruct** | **Qwen3-8B-Instruct** | **Moonlight-16B-A3B-Instruct** | **LLaMA3.1-8B** |
39
+ | :--------------------------------------------: | :--------: | :---------------: | :-----------: | :-------------------: | :-------------------: | :-----------: | :-------------: |
40
+ | MMLU(EM) | 5 | **74.33** | 71.27 | 70.09 | 75.97 | 70.74 | 68.67 |
41
+ | GPQA(Pass@1) | 0 | **36.55** | 29.73 | 40.4 | 47.10 | 19.51 | 27.59 |
42
+ | HumanEval(Pass@1) | 0 | **87.27** | 84.38 | 81.94 | 85.29 | 72.94 | 67.23 |
43
+ | LiveCodeBench 2408-2502 (Pass@1) | 0 | **22.7** | 18.94 | 21.8 | 26.88 | 14.76 | 18.41 |
44
+ | LCBench(pass@1) | 0 | **60.37** | 46.57 | 48.61 | 60.03 | 28.39 | 23.13 |
45
+ | Math(EM) | 0 | **82.62** | 72.80 | 81.46 | 82.70 | 67.1 | 52.42 |
46
+ | AIME2024(pass@1) | 0 | **21.88** | 10.21 | 20.62 | 26.25 | 6.88 | 7.29 |
47
+ | OlympiadBench(pass@1) | 0 | **52.30** | 36.44 | 54.33 | 56.11 | 32.85 | 17.04 |
48
+ | BBH(EM) | 0 | **75.75** | 66.38 | 78.21 | 79.33 | 63.45 | 68.05 |
49
+ | IFEval(Prompt Strict) | 0 | **77.70** | 77.99 | 81.06 | 83.55 | 49.01 | 73.01 |
50
+ | BFCL_live | 0 | **72.15** | 67.93 | 65.35 | 69.83 | 47.14 | 49.98 |
51
+
52
+
53
+ #### Context Window
54
+
55
+ ![undefined](https://intranetproxy.alipay.com/skylark/lark/0/2025/png/19756943/1747044731734-f55a4411-7a0e-450d-be53-4de7b77f6521.png)
56
+
57
+ 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**.
58
+
59
+ ## Quickstart
60
+ ### 🤗 Hugging Face Transformers
61
+
62
+ Here is a code snippet to show you how to use the chat model with `transformers`:
63
+
64
+ ```python
65
+ from transformers import AutoModelForCausalLM, AutoTokenizer
66
+
67
+ model_name = "inclusionAI/Ling-lite-1.5"
68
+
69
+ model = AutoModelForCausalLM.from_pretrained(
70
+ model_name,
71
+ torch_dtype="auto",
72
+ device_map="auto"
73
+ )
74
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
75
+
76
+ prompt = "Give me a short introduction to large language models."
77
+ messages = [
78
+ {"role": "system", "content": "You are Ling, an assistant created by inclusionAI"},
79
+ {"role": "user", "content": prompt}
80
+ ]
81
+ text = tokenizer.apply_chat_template(
82
+ messages,
83
+ tokenize=False,
84
+ add_generation_prompt=True
85
+ )
86
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
87
+
88
+ generated_ids = model.generate(
89
+ **model_inputs,
90
+ max_new_tokens=512
91
+ )
92
+ generated_ids = [
93
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
94
+ ]
95
+
96
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
97
+ ```
98
+
99
+ ## Deployment
100
+
101
+ Please refer to [Github](https://github.com/inclusionAI/Ling/blob/master/README.md)
102
+
103
+ ## License
104
+ This code repository is licensed under [the MIT License](https://huggingface.co/inclusionAI/Ling-lite/blob/main/LICENCE).
105
+
106
+ ## Citation
107
+
108
+ If you find our work helpful, feel free to give us a cite.
109
+
110
+ ```
111
+ @article{ling,
112
+ title = {Every FLOP Counts: Scaling a 300B Mixture-of-Experts LING LLM without Premium GPUs},
113
+ author = {Ling Team},
114
+ journal = {arXiv preprint arXiv:2503.05139},
115
+ year = {2025}
116
+ }
117
+ ```