Edit model card

This is a fine-tuned Chinese & English Chat mode based on google/gemma-7b using c-s-ale/alpaca-gpt4-data-zh dataset

example code



import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
import math

## v2 models
model_path = "cloudyu/google-gemma-7b-chinese-sft-v1"

tokenizer = AutoTokenizer.from_pretrained(model_path, use_default_system_prompt=False)
model = AutoModelForCausalLM.from_pretrained(
        model_path, torch_dtype=torch.bfloat16, device_map='auto',local_files_only=False
)
print(model)
prompt = input("please input prompt:")
while len(prompt) > 0:
  prompt = f"{prompt}"
  input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to("cuda")

  generation_output = model.generate(
    input_ids=input_ids, max_new_tokens=500,repetition_penalty=1.1
  )
  print(tokenizer.decode(generation_output[0]))
  prompt = input("please input prompt:")

Template


"<bos>{instruction} {input}\n{output}\n<eos>"

example output

<bos>如何写一封申请加薪的邮件? <built-in function input>
您好,

以下是您可以参考的一份示例电子邮件:


主题: 要求增加工资 - [您的姓名] (Your Name)



尊敬的主管 / HR 部门 ([Name of Manager or Department]) :




我非常感谢您给予我的机会并为公司做出贡献。我很乐意报告我在过去几个月的表现和成果, 并希望这些可以支持我对提高 my salary 的请求. 我相信这将是一个公平的要求并且能够帮助我们一起推动公司的成功发展 .





在过去的几月里 , 我的工作质量得到了提升 ,同时我也取得了重要的成绩 。例如 ... (在此处列出一些具体的事实证明你的努力)






此外 I have also been able to take on additional responsibilities and projects that demonstrate the value i bring  to our team as a whole .(If applicable add here your achievements in this area.)







我希望通过这个信件来表达对未来继续与该公司合作的机会以及期待进一步改善自己能力以更好地服务于客户的需求 和 公司的发展方向 一致性的信心!谢谢你们考虑此问题并在将来可能采取行动之前提供任何建议或反馈意见!








敬礼 !









[ Your name ]<eos>
Downloads last month
11
Safetensors
Model size
8.54B params
Tensor type
BF16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for cloudyu/google-gemma-7b-chinese-sft-v1

Merges
2 models