Downloads · 30 days
290
52% of all-time downloads
raincandy-u/Rain-v2
Rain-v2 is a text generation model from raincandy-u. 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.
Rain-v2 是一个约 1 亿参数的英文自回归语言模型,在 RTX 4090 约两天内完成预训练,展示了在有限算力下从数据到模型的完整实践路径。
Downloads · 30 days
290
52% of all-time downloads
All-time downloads
559
Public
Parameters
128M
256 MB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors256 MB · 100%
From the Hugging Face model README
Rain-v2 是一个约 1 亿参数的英文自回归语言模型,在 RTX 4090 约两天内完成预训练,展示了在有限算力下从数据到模型的完整实践路径。
总量约 10 B。
易输出错误事实或伪造信息。未经对齐,会生成偏见/有害/违法内容;请勿直接面向终端用户。
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("raincandy-u/Rain-v2", torch_dtype=torch.bfloat16, device_map="auto")
tok = AutoTokenizer.from_pretrained("your-namespace/Rain-v2")
prompt = "Here's a fairy tale about a little pig. A long, long time ago, there was a little pig called "
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=120, temperature=0.8, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))