Instructions to use hyperspaceai/thor-1-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hyperspaceai/thor-1-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-35B-A3B") model = PeftModel.from_pretrained(base_model, "hyperspaceai/thor-1-lora") - Transformers
How to use hyperspaceai/thor-1-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hyperspaceai/thor-1-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hyperspaceai/thor-1-lora", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hyperspaceai/thor-1-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hyperspaceai/thor-1-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hyperspaceai/thor-1-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hyperspaceai/thor-1-lora
- SGLang
How to use hyperspaceai/thor-1-lora 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 "hyperspaceai/thor-1-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hyperspaceai/thor-1-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "hyperspaceai/thor-1-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hyperspaceai/thor-1-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hyperspaceai/thor-1-lora with Docker Model Runner:
docker model run hf.co/hyperspaceai/thor-1-lora
THOR-1: Unified MoE Brain
THOR-1 is a LoRA adapter for Qwen3.5-35B-A3B (MoE: 35B total params, 3B active) that unifies 6 AI orchestration capabilities into a single model.
Capabilities (6 modes)
| Mode | Tag | Purpose |
|---|---|---|
| Intent | [INTENT] |
Classify user intent and extract parameters |
| Decompose | [DECOMPOSE] |
Break complex tasks into executable DAG steps |
| Execute | [EXECUTE] |
Iterative REPL-style code execution |
| Predict | [PREDICT] |
Predict execution outcomes (world model) |
| Route | [ROUTE] |
Route inference across providers/models |
| Rank | [RANK] |
Rank and select agents/skills/tools |
Each training example has a mode tag prefix in the system prompt that teaches the model to activate different expert mixtures per task type.
Training Details
- Base model: Qwen3.5-35B-A3B (hybrid linear attention + Mamba SSM + 256 MoE experts)
- Method: LoRA (r=16, alpha=32, targets: q_proj + v_proj)
- Training data: 6,384 examples across 6 modes (SFT format)
- Epochs: 3 (1,077 steps)
- Best validation loss: 0.2504
- Training time: 12.9 hours on NVIDIA H100 80GB
- Precision: BF16 with BitsAndBytes 4-bit quantization (NF4)
- Optimizer: AdamW 8-bit, LR=2e-5 with cosine decay
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-35B-A3B", trust_remote_code=True)
model = PeftModel.from_pretrained(base_model, "hyperspaceai/thor-1-lora")
tokenizer = AutoTokenizer.from_pretrained("hyperspaceai/thor-1-lora")
prompt = "<|im_start|>system\n[INTENT] Classify the user's intent.\n<|im_end|>\n<|im_start|>user\nBook a flight to Tokyo next Friday<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Part of the Thor Ecosystem
THOR-1 is the unified brain of the Thor AI orchestration system, powering intelligent task routing, agent selection, and execution planning across 21 named agents and 1,200+ community agents.
Developed by: HyperspaceAI
- Downloads last month
- -