Run this model with HF Jobs

Run raincandy-u/Rain-v2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/raincandy-u/Rain-v2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/raincandy-u/Rain-v2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/raincandy-u/Rain-v2. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/raincandy-u/Rain-v2. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="raincandy-u/Rain-v2")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("raincandy-u/Rain-v2")
model = AutoModelForCausalLM.from_pretrained("raincandy-u/Rain-v2", device_map="auto")
Quick Links

Rain-v2

Rain-v2 是一个约 1 亿参数的英文自回归语言模型,在 RTX 4090 约两天内完成预训练,展示了在有限算力下从数据到模型的完整实践路径。

模型与训练配置

  • 参数规模:≈100M
  • 架构:32 层解码器,隐藏维 512,8 头 GQA(4 个 KV 头),RoPE,RMSNorm,SwiGLU,输入/输出权重共享
  • 词表:自训 BPE,16,384 词,面向英文/代码/数学混合语料
  • 上下文长度:1024
  • 学习率调度:1% warmup + cosine decay
  • 训练总量:≈6.64×10^8 tokens,总用时 ~40 小时 @ RTX 4090

数据配比

  • FineWeb-Edu(高质量英文教育语料)60%
  • Stack-Edu(Python 教学代码/问答子集)30%
  • FineMath-4+(高质量数学/逻辑)10%

总量约 10 B。

评测摘要(5-shot)

  • ARC-Easy:40%
  • HellaSwag:30%
  • PIQA:60%
  • Winogrande: 51%

安全与限制

易输出错误事实或伪造信息。未经对齐,会生成偏见/有害/违法内容;请勿直接面向终端用户。

使用示例

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))
Downloads last month
102
Safetensors
Model size
0.1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train raincandy-u/Rain-v2

Evaluation results