gemma-7B-it-firefly

我要开发同款
匿名用户2024年07月31日
28阅读
所属分类ai、gemma、Pytorch
开源地址https://modelscope.cn/models/sansheng/gemma-7B-it-firefly
授权协议apache-2.0

作品详情

Model Card for Firefly-Gemma

gemma-7B-it-firefly is trained based on gemma-7b-it to act as a helpful and harmless AI assistant. we trained the model on firefly-train-1.1M dataset with LoRA.

Performance

we evaluate the model on Open LLM Leaderboard

Usage

The chat template of our chat models is same as Official gemma-7b-it:

<bos><start_of_turn>user
Write a hello world program<end_of_turn>
<start_of_turn>model

You can also use the following code:

from modelscope import AutoModelForCausalLM, AutoTokenizer

model_name_or_path = "sansheng/gemma-7B-it-firefly"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path)

input_text = "给我写一首关于机器学习的诗歌。"
input_ids = tokenizer(input_text, return_tensors="pt")

outputs = model.generate(**input_ids)
print(tokenizer.decode(outputs[0]))
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论