codefuse-admin
commited on
Upload README.md
Browse files
README.md
CHANGED
@@ -40,8 +40,9 @@ vllm=0.5.3
|
|
40 |
### transformers
|
41 |
```
|
42 |
from transformers import AutoTokenizer, AutoModel
|
|
|
43 |
|
44 |
-
model_name_or_path = "CodeFuse-CGE-Large"
|
45 |
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True)
|
46 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True, truncation_side='right', padding_side='right')
|
47 |
|
@@ -64,7 +65,7 @@ prefix_dict = {'python':{'query':'Retrieve the Python code that solves the foll
|
|
64 |
text = ["Writes a Boolean to the stream.",
|
65 |
"def writeBoolean(self, n): t = TYPE_BOOL_TRUE if n is False: t = TYPE_BOOL_FALSE self.stream.write(t)"]
|
66 |
text[0] += prefix_dict['python']['query']
|
67 |
-
text[
|
68 |
embed = model.encode(tokenizer, text)
|
69 |
score = embed[0] @ embed[1].T
|
70 |
print("score", score)
|
@@ -84,7 +85,7 @@ Thanks to the authors of open-sourced datasets, including CSN, Adv, CoSQA.
|
|
84 |
Since CodeFuse-CGE-Large is fine-tuned based on CodeQwen1.5-7B model, our usage license follows the same terms as that of CodeQwen1.5-7B model.
|
85 |
|
86 |
## 加入我们
|
87 |
-
我们是平台技术事业群AI Native
|
88 |
|
89 |
我们正在寻找行业中的佼佼者加入我们的团队!如果您希望在一个充满活力、创新和卓越文化的环境中发展您的职业生涯,欢迎您查看我们的社招&校招机会,加入我们,一起创造下一个行业里程碑。
|
90 |
|
|
|
40 |
### transformers
|
41 |
```
|
42 |
from transformers import AutoTokenizer, AutoModel
|
43 |
+
import torch
|
44 |
|
45 |
+
model_name_or_path = "codefuse-ai/CodeFuse-CGE-Large"
|
46 |
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True)
|
47 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True, truncation_side='right', padding_side='right')
|
48 |
|
|
|
65 |
text = ["Writes a Boolean to the stream.",
|
66 |
"def writeBoolean(self, n): t = TYPE_BOOL_TRUE if n is False: t = TYPE_BOOL_FALSE self.stream.write(t)"]
|
67 |
text[0] += prefix_dict['python']['query']
|
68 |
+
text[1] += prefix_dict['python']['passage']
|
69 |
embed = model.encode(tokenizer, text)
|
70 |
score = embed[0] @ embed[1].T
|
71 |
print("score", score)
|
|
|
85 |
Since CodeFuse-CGE-Large is fine-tuned based on CodeQwen1.5-7B model, our usage license follows the same terms as that of CodeQwen1.5-7B model.
|
86 |
|
87 |
## 加入我们
|
88 |
+
我们是平台技术事业群AI Native团队,负责蚂蚁集团平台工程的智能化,团队成立3年多以来,支持了蚂蚁集团云计算基础设施智能化运维的升级改造。团队的Mission是,通过世界级的技术创新和影响,构建有广泛用户的算法服务和平台,支撑内外部产品和业务落地。团队秉承创新基因,在支撑业务落地的同时,推动技术影响。3年以来在ICLR、NeurIPS、KDD、ACL等顶会发表论文20余篇,创新业务结果获得两次蚂蚁技术最高奖T-Star,1次蚂蚁集团最高奖SuperMA。开源项目CodeFuse获得4K点赞(2024年2月),Huggingface和modelscope上模型累积下载量超过150万次。
|
89 |
|
90 |
我们正在寻找行业中的佼佼者加入我们的团队!如果您希望在一个充满活力、创新和卓越文化的环境中发展您的职业生涯,欢迎您查看我们的社招&校招机会,加入我们,一起创造下一个行业里程碑。
|
91 |
|