Downloads · 30 days
16
3% of all-time downloads
FreedomIntelligence/HuatuoGPT2-34B-4bits
HuatuoGPT2-34B-4bits 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-4bits </h1 </div
Downloads · 30 days
16
3% of all-time downloads
All-time downloads
605
Public
Repo size
19.3 GB
Likes
3
Public
Click a slice to open those files.
.bin19.2 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-4bits", use_fast=True, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/HuatuoGPT2-34B-4bits", device_map="auto", torch_dtype="auto", trust_remote_code=True)
model.generation_config = GenerationConfig.from_pretrained("FreedomIntelligence/HuatuoGPT2-34B-4bits")
messages = []
messages.append({"role": "user", "content": "肚子疼怎么办?"})
response = model.HuatuoChat(tokenizer, messages)
print(response)