ModelHub XC 8d72914fcf 初始化项目,由ModelHub XC社区提供模型
Model: yys/gemma-7B-it-firefly
Source: Original Platform
2026-04-18 16:12:21 +08:00

library_name, license, basemodel
library_name license basemodel
transformers apache-2.0 google/gemma-7b-it

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 using 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 transformers import AutoTokenizer, AutoModelForCausalLM

model_name_or_path = "yys/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]))

Description
Model synced from source: yys/gemma-7B-it-firefly
Readme 80 KiB