GitHub:https://github.com/Langboat/Mengzi3
HuggingFace:https://huggingface.co/Langboat/Mengzi3-13B-Base
ModelScope:https://www.modelscope.cn/models/langboat/Mengzi3-13B-Base
Wisemodel:https://wisemodel.cn/models/Langboat/Mengzi3-13B-Base
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Langboat/Mengzi3-13B-Base", use_fast=False, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Langboat/Mengzi3-13B-Base", device_map="auto", trust_remote_code=True)
inputs = tokenizer('介绍一下孟子:', return_tensors='pt')
if torch.cuda.is_available():
inputs = inputs.to('cuda')
pred = model.generate(**inputs, max_new_tokens=512, repetition_penalty=1.1, eos_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(pred[0], skip_special_tokens=True))


”
澜舟科技官方网站
获奖与新闻
澜舟科技完成信通院“可信AI”评估
澜舟科技完成Pre-A+轮融资
HICOOL 2021创业大赛一等奖 | 周明博士专访
技术专栏一览

开源项目地址
期待您的关注与加入:)
内容中包含的图片若涉及版权问题,请及时与我们联系删除
评论
沙发等你来抢