Downloads · 30 days
155
2% of all-time downloads
FreedomIntelligence/HuatuoGPT2-34B
HuatuoGPT2-34B is a text generation model from FreedomIntelligence. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<div align="center" <h1 HuatuoGPT2-34B </h1 </div
Downloads · 30 days
155
2% of all-time downloads
All-time downloads
6.4K
Public
Repo size
138 GB
Likes
9
Public
Click a slice to open those files.
.bin68.8 GB · 100%
From the Hugging Face model README
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation.utils import GenerationConfig
tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/HuatuoGPT2-34B", use_fast=True, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/HuatuoGPT2-34B", device_map="auto", torch_dtype="auto", trust_remote_code=True)
model.generation_config = GenerationConfig.from_pretrained("FreedomIntelligence/HuatuoGPT2-34B")
messages = []
messages.append({"role": "user", "content": "肚子疼怎么办?"})
response = model.HuatuoChat(tokenizer, messages)
print(response)