GoZion commited on
Commit
929fea3
·
verified ·
1 Parent(s): b47388e

Upload 3 files

Browse files
Files changed (3) hide show
  1. LICENCE +21 -0
  2. README.md +82 -3
  3. ant-bailing.png +0 -0
LICENCE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 inclusionAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md CHANGED
@@ -1,3 +1,82 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ling-Coder-lite-base
2
+
3
+ <p align="center">
4
+ <img src="https://huggingface.co/inclusionAI/Ling-lite/resolve/main/ant-bailing.png" width="100"/>
5
+ <p>
6
+
7
+ <p align="center">
8
+ 🤗 <a href="https://huggingface.co/inclusionAI">Hugging Face</a>
9
+ <p>
10
+
11
+ ## Introduction
12
+
13
+ Ling-Coder-Lite is a MoE LLM provided and open-sourced by InclusionAI, which has 16.8 billion parameters with 2.75 billion activated parameters. Ling-Coder-Lite performs impressively on coding tasks compared to existing models in the industry. Specifically, Ling-Coder-Lite further pre-training from an intermediate checkpoint of Ling-Lite, incorporating an additional 3 trillion tokens. This extended pre-training significantly boosts the coding abilities of Ling-Lite, while preserving its strong performance in general language tasks.
14
+
15
+ ## Model Downloads
16
+
17
+ 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.
18
+
19
+ <div align="center">
20
+
21
+ | **Model** | **#Total Params** | **#Activated Params** | **Context Length** | **Download** |
22
+ | :----------------: | :---------------: | :-------------------: | :----------------: | :----------: |
23
+ | Ling-Coder-lite-base | 16.8B | 2.75B | 4K | [🤖 ModelScope](https://www.modelscope.cn/models/inclusionAI/Ling-coder-lite-base) |
24
+ | Ling-Coder-lite | 16.8B | 2.75B | 4K | [🤖 ModelScope](https://www.modelscope.cn/models/inclusionAI/Ling-Coder-lite) |
25
+ </div>
26
+
27
+ ## Evaluation
28
+
29
+ Detailed evaluation results are reported in our technical report [TBD].
30
+
31
+ ## Quickstart
32
+ ### 🤗 Hugging Face Transformers
33
+
34
+ Here is a code snippet to show you how to use the chat model with `transformers`:
35
+
36
+ ```python
37
+ from transformers import AutoModelForCausalLM, AutoTokenizer
38
+
39
+ model_name = "inclusionAI/Ling-Coder-lite"
40
+
41
+ model = AutoModelForCausalLM.from_pretrained(
42
+ model_name,
43
+ torch_dtype="auto",
44
+ device_map="auto",
45
+ trust_remote_code=True
46
+ )
47
+ tokenizer = AutoTokenizer.from_pretrained(
48
+ model_name,
49
+ trust_remote_code=True
50
+ )
51
+
52
+ prompt = "Write a quick sort algorithm in python."
53
+ messages = [
54
+ {"role": "user", "content": prompt}
55
+ ]
56
+ text = tokenizer.apply_chat_template(
57
+ messages,
58
+ tokenize=False,
59
+ add_generation_prompt=True
60
+ )
61
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
62
+
63
+ generated_ids = model.generate(
64
+ **model_inputs,
65
+ max_new_tokens=512
66
+ )
67
+ generated_ids = [
68
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
69
+ ]
70
+
71
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
72
+ print(response)
73
+ ```
74
+
75
+ ## Deployment
76
+ Please refer to [Github](https://github.com/inclusionAI/Ling/blob/master/README.md)
77
+
78
+ ## License
79
+ This code repository is licensed under [the MIT License](https://huggingface.co/inclusionAI/Ling-Coder-lite/blob/main/LICENCE).
80
+
81
+ ## Citation
82
+ [TBD]
ant-bailing.png ADDED