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