zhujiangang commited on
Commit
ee72c48
·
verified ·
1 Parent(s): 36a3898

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +89 -3
README.md CHANGED
@@ -1,3 +1,89 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # Ling
6
+
7
+ <p align="center">
8
+ <img src="https://huggingface.co/inclusionAI/Ling-lite/resolve/main/ant-bailing.png" width="100"/>
9
+ <p>
10
+
11
+ <p align="center">
12
+ 🤗 <a href="https://huggingface.co/inclusionAI">Hugging Face</a>
13
+ <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 Modulescope.cn to speed up the download process.
26
+
27
+ <div align="center">
28
+
29
+ | **Model** | **#Total Params** | **#Activated Params** | **Context Length** | **Download** |
30
+ | :----------------: | :---------------: | :-------------------: | :----------------: | :----------: |
31
+ | Ling-plus-base | 290B | 28.8B | 64K | [🤗 HuggingFace](https://huggingface.co/inclusionAI/Ling-plus-base) |
32
+ | Ling-plus | 290B | 28.8B | 64K | [🤗 HuggingFace](https://huggingface.co/inclusionAI/Ling-plus) |
33
+ </div>
34
+
35
+ ## Evaluation
36
+
37
+ Detailed evaluation results are reported in our technical report [TBD].
38
+
39
+ ## Quickstart
40
+ ### 🤗 Hugging Face Transformers
41
+
42
+ Here is a code snippet to show you how to use the chat model with `transformers`:
43
+
44
+ ```python
45
+ from transformers import AutoModelForCausalLM, AutoTokenizer
46
+
47
+ model_name = "inclusionAI/Ling-lite"
48
+
49
+ model = AutoModelForCausalLM.from_pretrained(
50
+ model_name,
51
+ torch_dtype="auto",
52
+ device_map="auto"
53
+ )
54
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
55
+
56
+ prompt = "Give me a short introduction to large language models."
57
+ messages = [
58
+ {"role": "system", "content": "You are Ling, an assistant created by inclusionAI"},
59
+ {"role": "user", "content": prompt}
60
+ ]
61
+ text = tokenizer.apply_chat_template(
62
+ messages,
63
+ tokenize=False,
64
+ add_generation_prompt=True
65
+ )
66
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
67
+
68
+ generated_ids = model.generate(
69
+ **model_inputs,
70
+ max_new_tokens=512
71
+ )
72
+ generated_ids = [
73
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
74
+ ]
75
+
76
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
77
+ ```
78
+
79
+ ## Deployment
80
+
81
+ ### vLLM
82
+
83
+ ### MindIE
84
+
85
+ ## License
86
+ This code repository is licensed under [the MIT License](https://huggingface.co/inclusionAI/Ling-lite/blob/main/LICENCE).
87
+
88
+ ## Citation
89
+ [TBD]