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/sentience-integration-summary.js from masterofthestars/tianxuan: direct link, hf CLI and curl.
- Browser
- Download file 3.29 kB
-
https://huggingface.co/masterofthestars/tianxuan/resolve/main/scripts/sentience-integration-summary.js
- Command line
-
hf download hf://masterofthestars/tianxuan/scripts/sentience-integration-summary.js
-
curl -L -o sentience-integration-summary.js https://huggingface.co/masterofthestars/tianxuan/resolve/main/scripts/sentience-integration-summary.js
3.29 kB
| /** | |
| * 天玄 TianXuan - 感受模块集成说明 | |
| */ | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| console.log('='.repeat(70)); | |
| console.log('天玄 TianXuan - 感受模块 (Sentience Module) 集成完成'); | |
| console.log('='.repeat(70)); | |
| console.log(''); | |
| console.log('【感受模块功能】'); | |
| console.log(''); | |
| console.log('1. 情绪系统 (Emotion System)'); | |
| console.log(' - Valence (效价): [-1, 1] 负性 ↔ 正性'); | |
| console.log(' - Arousal (唤醒): [0, 1] 低唤醒 ↔ 高唤醒'); | |
| console.log(' - Dominance (主导): [0, 1] 被动 ↔ 主导'); | |
| console.log(' - 情绪描述: 兴奋/平静/焦虑/低落 + (主导/被动)'); | |
| console.log(''); | |
| console.log('2. 稳态系统 (Homeostasis)'); | |
| console.log(' - Energy (能量): 随时间衰减,学习后恢复'); | |
| console.log(' - Stress (压力): 高 loss 时增加,随时间衰减'); | |
| console.log(' - Curiosity (好奇心): 新颖度驱动'); | |
| console.log(' - Satiety (满足感): 学习进展'); | |
| console.log(''); | |
| console.log('3. 动机系统 (Motivation)'); | |
| console.log(' - Explore (探索): 好奇心 + 新颖度需求'); | |
| console.log(' - Exploit (利用): 满足感 + 能量水平'); | |
| console.log(' - Avoid (回避): 压力 + 负性情绪'); | |
| console.log(' - Approach (接近): 正性情绪 + 能量'); | |
| console.log(''); | |
| console.log('4. 调制输出 (Modulation)'); | |
| console.log(' - lrMultiplier: 学习率调节 [0.3, 2.0]'); | |
| console.log(' - temperatureModifier: 生成温度调节 [0.5, 2.0]'); | |
| console.log(' - topKModifier: 采样范围调节 [0.5, 2.0]'); | |
| console.log(''); | |
| console.log('【集成状态】'); | |
| console.log(''); | |
| console.log('✓ 已创建感受模块文件: src/ml/sentience.ts'); | |
| console.log('✓ 已创建测试脚本: scripts/test-sentience.js'); | |
| console.log('✓ 编译成功: npm run build'); | |
| console.log('✓ 测试通过: node scripts/test-sentience.js'); | |
| console.log(''); | |
| console.log('【下一步集成】'); | |
| console.log(''); | |
| console.log('1. 修改 CharMultiNeuro 类添加感受模块'); | |
| console.log(' - 在构造函数中创建 SentienceModule 实例'); | |
| console.log(' - 在 trainStepBatch 中调用 update() 更新感受态'); | |
| console.log(' - 在生成时使用 getModulationSignals() 调制参数'); | |
| console.log(''); | |
| console.log('2. 修改训练脚本 train.ts'); | |
| console.log(' - 添加 --sentience 开关'); | |
| console.log(' - 在检查点中保存/恢复感受状态'); | |
| console.log(' - 在日志中输出感受信息'); | |
| console.log(''); | |
| console.log('3. 修改生成脚本 generate.js'); | |
| console.log(' - 加载感受状态'); | |
| console.log(' - 根据感受调整生成参数'); | |
| console.log(''); | |
| console.log('【设计理念】'); | |
| console.log(''); | |
| console.log('感受模块模拟生物体的内在状态,使模型具有:'); | |
| console.log('- 情绪反应 (基于预测误差和多巴胺)'); | |
| console.log('- 稳态调节 (能量、压力、好奇心)'); | |
| console.log('- 动机驱动 (探索 vs 利用)'); | |
| console.log('- 自适应学习 (调制学习率、温度、采样范围)'); | |
| console.log(''); | |
| console.log('这使模型从"纯计算"进化到"类生物",具有内在驱动力和感受能力。'); | |
| console.log(''); | |
| console.log('='.repeat(70)); | |
| console.log('集成完成,等待下一步指示'); | |
| console.log('='.repeat(70)); | |