Cherrytest commited on
Commit
bdb2ae1
1 Parent(s): 264e927

first commit

Browse files
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.md filter=lfs diff=lfs merge=lfs -text
37
+ *.png filter=lfs diff=lfs merge=lfs -text
38
+ *.json filter=lfs diff=lfs merge=lfs -text
39
+ *.py filter=lfs diff=lfs merge=lfs -text
LOGO.png CHANGED

Git LFS Details

  • SHA256: f11ce0268d9a5292f16388a70f5ea437e3e8a0b00e1bb73e64a970d24cc8340c
  • Pointer size: 130 Bytes
  • Size of remote file: 21.8 kB
MODEL_LICENSE.md CHANGED
@@ -1,47 +1,3 @@
1
- # CodeFuse COMMUNITY LICENSE AGREEMENT
2
- CodeFuse Release Date: September 8, 2023
3
-
4
- By clicking to agree or by using or distributing any portion or element of the Materials, you will be deemed to have recognized and accepted the content of this Agreement, which is effective immediately.
5
-
6
- 1. Definitions.
7
- a. This CodeFuse COMMUNITY LICENSE AGREEMENT (this "Agreement") shall mean the terms and conditions for use, reproduction, distribution and modification of the Materials as defined by this Agreement.
8
- b. "Ant" or "We" (or "Us") shall mean Ant Group.
9
- c. "CodeFuse" shall mean the large language models (including CodeFuse-13B and CodeFuse-CodeLlaMa-34B), and software and algorithms, consisting of trained model weights, parameters (including optimizer states), machine-learning model code, and other elements of the foregoing distributed by Us.
10
- d. "Documentation" shall mean the specifications, manuals and documentation accompanying CodeFuse distributed by Us.
11
- e. "Materials" shall mean, collectively, Ant's proprietary CodeFuse and Documentation (and any portion thereof) made available under this Agreement.
12
- f. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
13
- g. "Source" form shall mean the preferred form for making modifications, including but not limited to model source code, documentation source, and configuration files.
14
- h. "Third Parties" (or "Third Party") shall mean individuals or legal entities that are not controlling, controlled by Us or You, or under common control with Us or You.
15
- i. "You" (or "Your") shall mean a natural person or legal entity exercising the rights granted by this Agreement and/or using the Materials for any purpose and in any field of use.
16
-
17
- 2. Grant of Rights.
18
- You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Ant's intellectual property or other rights owned by Ant embodied in the Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Materials.
19
-
20
- 3. Redistribution.
21
- You may distribute or make the Materials or derivative works thereof available to a Third Party in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
22
- a. You shall provide a copy of this Agreement to such Third Party;
23
- b. if You modify the CodeFuse model, You shall provide a prominent notice, stating how You have modified the CodeFuse model, to such Third Party; and
24
- c. You shall retain in all copies of the Materials that You distribute the following attribution notices within a "Notice" text file distributed as a part of such copies: "CodeFuse is licensed under the CodeFuse COMMUNITY LICENSE AGREEMENT, Copyright (c) Ant Group. All Rights Reserved."
25
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such derivative works as a whole, provided Your use, reproduction, and distribution of the work otherwise complies with the terms and conditions of this Agreement.
26
-
27
- 4. Rules of Use.
28
- You shall comply with applicable laws and regulations (including without limitation export controls or restrictions) in Your use of the Materials.
29
-
30
- 5. Intellectual Property.
31
- a. Ant retains ownership of all intellectual property rights in and to the Materials and derivatives made by or for Ant. Conditioned upon compliance with the terms and conditions of this Agreement, with respect to any derivative works and modifications of the Materials that are made by You, You are and will be the owner of such derivative works and modifications.
32
- b. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Ant, except as required to fulfill notice requirements under this Agreement or as required for reasonable and customary use in describing and redistributing the Materials.
33
- c. If You commence a lawsuit or other proceedings (including a cross-claim or counterclaim in a lawsuit) against Ant or any entity alleging that the Materials or any output therefrom, or any part of the foregoing, infringe any intellectual property or other right owned or licensable by You, then all licences granted to You under this Agreement shall terminate as of the date such lawsuit or other proceeding is commenced or brought.
34
-
35
- 6. Disclaimer of Warranty and Limitation of Liability.
36
- a. Ant is not obligated to support, update, provide training for, or develop any further version of the Materials or to grant any license thereto.
37
- b. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. WE MAKE NO WARRANTY AND ASSUME NO RESPONSIBILITY FOR THE SAFETY OR STABILITY OF THE MATERIALS AND ANY OUTPUT THEREFROM.
38
- c. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE MATERIALS AND ANY OUTPUT AND RESULTS. IN NO EVENT SHALL WE BE LIABLE TO YOU FOR ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT OR ARISING FROM YOUR USE OR INABILITY TO USE THE MATERIALS OR ANY OUTPUT OF IT, FOR ANY DIRECT, OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, NO MATTER HOW IT'S CAUSED OR EVEN IF ANT OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
39
- d. You will defend, indemnify and hold harmless Ant from and against any claim by any Third Party arising out of or related to Your use or distribution of the Materials.
40
-
41
- 7. Survival and Termination.
42
- a. The term of this Agreement shall commence upon Your acceptance of this Agreement or access to the Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein.
43
- b. We may terminate this Agreement if You breach any of the terms or conditions of this Agreement. Upon termination of this Agreement, You must delete and cease use of the Materials. Sections 6 and 8 shall survive the termination of this Agreement.
44
-
45
- 8. Governing Law and Jurisdiction.
46
- a. This Agreement and any dispute arising out of or relating to it, whether in contract, tort, negligence, products liability, or otherwise, will be governed by the laws of China, without regard to conflict of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement.
47
- b. The People's Courts in Hangzhou City shall have exclusive jurisdiction over any dispute arising out of this Agreement.
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58043a7f560e11559402d57e7fcb49633b55b76f056b3fc24bbf24c3a8b15f96
3
+ size 6998
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -1,68 +1,3 @@
1
- ---
2
- license: other
3
- ---
4
- # Model Card for CodeFuse-13B-4K
5
-
6
- ![Creation Approach](LOGO.png)
7
-
8
-
9
- [[中文]](#chinese) [[English]](#english)
10
-
11
-
12
-
13
- <a id="english"></a>
14
-
15
-
16
- ## Model Description
17
- CodeFuse-13B is a 13 billion parameter code generation model trained on the GPT-NeoX framework, capable of handling code sequences of up to 4096 characters. This model was pretrained on a dataset consisting of 1000B token code, Chinese, and English data, covering over 40 programming languages. To further enhance the effectiveness and quality of the generated code, the model was fine-tuned on the CodeFuse-Evol-instruction-66k dataset, enabling it to produce more accurate, efficient, and compliant code. Pass@1 achieved 37.1% on the HumanEval evaluation set(BeamSearch strategy, BeamSize=3).
18
-
19
-
20
- ## Requirements
21
- * Python 3.8 or above.
22
- * PyTorch 1.12 or above, with a recommendation for 2.0 or above.
23
- * Transformers 4.24.0 or above.
24
- * It is advisable to use CUDA 11.4 or above (for GPU users and flash-attention users, this option should be considered).
25
-
26
-
27
- ## Quickstart
28
-
29
- ```
30
- import torch
31
- from transformers import AutoModelForCausalLM, AutoTokenizer
32
-
33
- tokenizer = AutoTokenizer.from_pretrained("CodeFuse-13B")
34
- model = AutoModelForCausalLM.from_pretrained("CodeFuse-13B", torch_dtype="auto", device_map="auto")
35
-
36
- input_ids = encode("def quick_sort(array):\n", return_tensors="pt")
37
- output_ids = model.generate(input_ids, max_new_tokens=200, num_beams=3, num_return_sequences=1, repetition_penalty=1.2)
38
-
39
- print(tokenizer.decode(output_idss[0]))
40
- ```
41
-
42
- <a id="chinese"></a>
43
-
44
- ## 简介
45
- CodeFuse-13B是基于GPT-NeoX框架训练的13B参数代码生成模型,能够处理4096个字符的代码序列。该模型在1000B Token的代码、中文、英文数据数据集上进行预训练,覆盖超过40种编程语言。为了进一步提升生成代码的效果和质量,该模型还在CodeFuse-Evol-instruction-66k数据集上进行了微调,使得该模型能够生成更加准确、高效、符合要求的代码。在HumanEval评测集上Pass@1达到37.1%(采用BeamSearch解码,其中BeamSize=3)。
46
-
47
-
48
- ## 要求
49
- * python 3.8及以上版本
50
- * pytorch 1.12及以上版本,推荐2.0及以上版本
51
- * transformers 4.24.0及以上版本
52
- * 建议使用CUDA 11.4及以上(GPU用户、flash-attention用户等需考虑此选
53
-
54
-
55
- ## 快速使用
56
-
57
- ```
58
- import torch
59
- from transformers import AutoModelForCausalLM, AutoTokenizer
60
-
61
- tokenizer = AutoTokenizer.from_pretrained("CodeFuse-13B")
62
- model = AutoModelForCausalLM.from_pretrained("CodeFuse-13B", torch_dtype="auto", device_map="auto")
63
-
64
- input_ids = encode("def quick_sort(array):\n", return_tensors="pt")
65
- output_ids = model.generate(input_ids, max_new_tokens=200, num_beams=3, num_return_sequences=1, repetition_penalty=1.2)
66
-
67
- print(tokenizer.decode(output_idss[0]))
68
- ```
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6adadd5ecdf17f705330866fb989a10a8655ee5c1978b46e14ff28eedd6d27f5
3
+ size 4196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:214855c09d7b611d331172926256fed1d195c7976a71845b14e890200e79dec9
3
+ size 724
generation_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0409601bbbd56f08fac8d63b7d5b7c345e7abcee0fa3e1308638c3422d2c2ec5
3
+ size 121
pytorch_model-00001-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2d850076cdfa16d1f3d3f2f1aaa68bc1978904943d108be01e9c26183378a47
3
+ size 9931109051
pytorch_model-00002-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9a192b67cb02769a856b3d17386301437935f02947430ab69c4abaca072bccc
3
+ size 9753860029
pytorch_model-00003-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cdf16cf413f8d542ba40da7c3f9b459cbbfe540c1ca249111b89130f94073c0
3
+ size 9648959606
pytorch_model-00004-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a600029d8fd4b8d122a0b2ebf89dd2dd8c02e103ac1556b3f213d049c1820f1c
3
+ size 5032771584
pytorch_model-00005-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa33e28411e9f88868790bc3bb9f054521378e9a9c120edcd54582e729554882
3
+ size 7510851584
pytorch_model-00006-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48fafa1579284ba0e503f864aad2fbb6ce99df2c6ccdc3f901b07d88ba547a64
3
+ size 5526027224
pytorch_model.bin.index.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6afb71f636fec1bd4697f0b6228fa2864161dded61247fd42cdc30e1c3d65f3c
3
+ size 46064
special_tokens_map.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bcf4e58d0970bbcb3b111a4c1e297c082fbf61253b14b3c0c8f2972ccb61ba4
3
+ size 131
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20d9e8987ab304ea5dc4c5a49a181f4c40e1128dede1b74ce6b86068e49eae8f
3
+ size 4339761
tokenizer_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa93de105cdad2fe3162a41a6e0b8f188eed2f4f0ab855c0f0e0abcfe97b2ec8
3
+ size 146
trainer_state.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67f39aa33f0b19f360b63b53c25537f2b9b523279f3bea2f1cb24b9ea18db24d
3
+ size 965379
zero_to_fp32.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:061bdb6df821b30589945691c45ddf5731de7baf150f76b0555f850187e4062f
3
+ size 23610