Text Generation
Transformers
Chinese
English
character-level
chinese
gru
mamba
Mixture of Experts
titans
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
Tianxuan: full project + data (checkpoints, world_model, data without raw) with correct directory structure
db7bc06 Download scripts/integration-status-report.js from masterofthestars/tianxuan: direct link, hf CLI and curl.
- Browser
- Download file 3.68 kB
-
https://huggingface.co/masterofthestars/tianxuan/resolve/main/scripts/integration-status-report.js
- Command line
-
hf download hf://masterofthestars/tianxuan/scripts/integration-status-report.js
-
curl -L -o integration-status-report.js https://huggingface.co/masterofthestars/tianxuan/resolve/main/scripts/integration-status-report.js
3.68 kB
| /** | |
| * 天玄 TianXuan - 模块集成状态报告 | |
| */ | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| console.log('='.repeat(70)); | |
| console.log('天玄 TianXuan - 模块集成状态报告'); | |
| console.log('='.repeat(70)); | |
| console.log(''); | |
| const modules = [ | |
| { | |
| name: 'GRU 骨干', | |
| file: 'src/ml/gru.ts', | |
| status: '已集成', | |
| notes: '核心网络,已完整实现' | |
| }, | |
| { | |
| name: 'MoE 路由', | |
| file: 'src/ml/moe.ts', | |
| status: '已集成', | |
| notes: '混合专家路由,已完整实现' | |
| }, | |
| { | |
| name: 'Titans 记忆', | |
| file: 'src/ml/titans.ts', | |
| status: '已集成', | |
| notes: '在线神经记忆,已完整实现' | |
| }, | |
| { | |
| name: 'Replay Buffer', | |
| file: 'src/ml/replay_buffer.ts', | |
| status: '已集成', | |
| notes: '重放缓冲区,已完整实现' | |
| }, | |
| { | |
| name: '多巴胺调制', | |
| file: 'src/ml/dopamine.ts', | |
| status: '已集成', | |
| notes: 'RPE-based lr 调制,已完整实现' | |
| }, | |
| { | |
| name: 'STDP', | |
| file: 'src/ml/stdp.ts', | |
| status: '已集成', | |
| notes: '突触时序依赖可塑性,已完整实现' | |
| }, | |
| { | |
| name: 'STDA', | |
| file: 'src/ml/stda.ts', | |
| status: '已集成', | |
| notes: '突触阈值适应,已完整实现' | |
| }, | |
| { | |
| name: '世界模型', | |
| file: 'src/ml/world_model.ts', | |
| status: '已创建', | |
| notes: '状态转移学习,用户要求暂不集成' | |
| }, | |
| { | |
| name: '感受模块', | |
| file: 'src/ml/sentience.ts', | |
| status: '已创建,未集成', | |
| notes: '情绪/稳态/动机系统,需要集成到 CharMultiNeuro' | |
| }, | |
| { | |
| name: '上下文窗口', | |
| file: 'src/ml/tool_system.ts', | |
| status: '已创建,部分集成', | |
| notes: 'ContextWindow 类已创建,Engine 中有引用' | |
| }, | |
| { | |
| name: '工具系统', | |
| file: 'src/ml/tool_system.ts', | |
| status: '已创建,未集成', | |
| notes: 'ToolRegistry, PermissionManager, ErrorRecovery 已创建' | |
| }, | |
| { | |
| name: '集成模型', | |
| file: 'src/ml/integrated_model.ts', | |
| status: '刚创建', | |
| notes: '新创建的完整集成模型,包含所有模块' | |
| }, | |
| ]; | |
| console.log('【模块集成状态】\n'); | |
| console.log('| 模块 | 状态 | 说明 |'); | |
| console.log('|------|------|------|'); | |
| for (const m of modules) { | |
| const icon = m.status.includes('已集成') ? '✓' : | |
| m.status.includes('已创建') ? '○' : '✗'; | |
| console.log(`| ${icon} ${m.name} | ${m.status} | ${m.notes} |`); | |
| } | |
| console.log(''); | |
| console.log('【已集成模块】'); | |
| console.log(' ✓ GRU 骨干网络'); | |
| console.log(' ✓ MoE 混合专家路由'); | |
| console.log(' ✓ Titans 在线神经记忆'); | |
| console.log(' ✓ Replay Buffer 重放缓冲区'); | |
| console.log(' ✓ 多巴胺调制系统'); | |
| console.log(' ✓ STDP 突触可塑性'); | |
| console.log(' ✓ STDA 突触适应'); | |
| console.log(''); | |
| console.log('【待集成模块】'); | |
| console.log(' ○ 感受模块 - 需要集成到 CharMultiNeuro'); | |
| console.log(' ○ 上下文窗口 - 部分已集成到 Engine'); | |
| console.log(' ○ 工具系统 - 需要集成到 Engine'); | |
| console.log(' ○ 世界模型 - 用户要求暂不集成'); | |
| console.log(''); | |
| console.log('【已创建的集成方案】'); | |
| console.log(' ✓ src/ml/integrated_model.ts - 完整集成模型'); | |
| console.log(' ✓ scripts/test-integration.js - 集成测试脚本'); | |
| console.log(''); | |
| console.log('【下一步建议】'); | |
| console.log(' 1. npm run build 编译所有模块'); | |
| console.log(' 2. node scripts/test-integration.js 运行集成测试'); | |
| console.log(' 3. 将感受模块集成到现有 CharMultiNeuro'); | |
| console.log(' 4. 更新 train.ts 支持新模块'); | |
| console.log(''); | |
| console.log('='.repeat(70)); | |