Text Generation
Transformers
Chinese
English
character-level
chinese
gru
mamba
Mixture of Experts
titans
Run this model with HF Jobs
Run masterofthestars/tianxuan 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/masterofthestars/tianxuan. 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/masterofthestars/tianxuan 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/masterofthestars/tianxuan. 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/masterofthestars/tianxuan. 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.
Instructions to use masterofthestars/tianxuan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use masterofthestars/tianxuan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="masterofthestars/tianxuan")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("masterofthestars/tianxuan", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use masterofthestars/tianxuan with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "masterofthestars/tianxuan" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masterofthestars/tianxuan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/masterofthestars/tianxuan
- SGLang
How to use masterofthestars/tianxuan with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "masterofthestars/tianxuan" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masterofthestars/tianxuan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "masterofthestars/tianxuan" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masterofthestars/tianxuan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use masterofthestars/tianxuan with Docker Model Runner:
docker model run hf.co/masterofthestars/tianxuan
File size: 1,634 Bytes
db7bc06 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/usr/bin/env bash
# ============================================================
# 天玄完整训练脚本(可复现)
# 用法: bash scripts/train-full.sh [续训]
# 首次训练: bash scripts/train-full.sh
# 续训: bash scripts/train-full.sh resume
# ============================================================
set -euo pipefail
cd "$(dirname "$0")/.."
CK="sandbox/ck-full-multi"
LOG_DIR="sandbox/logs"
# 确保沙箱编译产物存在
if [ ! -d "sandbox/dist/ml" ]; then
echo "[*] 首次运行, 编译 TypeScript → sandbox/dist ..."
rm -rf sandbox/dist
npx tsc --outDir sandbox/dist
fi
# 确保语料存在
if [ ! -f "data/corpus.txt" ] || [ "$(wc -c < data/corpus.txt)" -lt 100000 ]; then
echo "[*] 生成训练语料(500万字符)..."
node -e "
const { buildCorpus } = require('./sandbox/dist/src/ml/data');
const fs = require('fs');
fs.mkdirSync('data', { recursive: true });
const b = buildCorpus({ seed: 7, tokens: 5000000, rawPerFile: 30000 });
fs.writeFileSync('data/corpus.txt', b.text, 'utf-8');
console.log('语料: ' + b.text.length + ' 字符');
"
fi
mkdir -p "$LOG_DIR"
if [ "${1:-}" = "resume" ] && [ -f "$CK/meta.json" ]; then
echo "[*] 续训模式: 从 $CK 检查点继续"
cd sandbox
exec node ../sandbox/dist/src/ml/train.js \
--resume ck-full-multi \
--epochs 2 --lr 0.002 --ckpt 50 --out ck-full-multi
else
echo "[*] 从头训练"
cd sandbox
exec node ../sandbox/dist/src/ml/train.js \
--tokens 5000000 --epochs 2 --lr 0.002 \
--hidden 256 --emb 64 --bptt 32 \
--attn 1 --mamba 1 --cnn 1 \
--ckpt 50 --out ck-full-multi
fi
|