Instructions to use LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5
- SGLang
How to use LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5 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 "LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5" \ --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": "LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5", "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 "LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5" \ --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": "LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5 with Docker Model Runner:
docker model run hf.co/LLM-course/TRM_d48_L1_H2_C4_35k_LegalW0p5
Chess model submitted to the LLM Course Chess Challenge.
Submission Info
- Submitted by: janisaiad
- Parameters: 43,104
- Organization: LLM-course
Model Details
- Architecture: Tiny Recursive Model (TRM) - looping recurrent transformer (cycle-shared weights)
- Vocab size: 148
- Embedding dim: 48
- Layers: 1
- Heads: 2
- Cycles: 4
TRM note: this is a looping TRM model — at inference/training time we run the same transformer stack for 4 recurrent refinement cycle(s) (weights are shared across cycles), which increases compute/reasoning depth without increasing parameter count.
- Downloads last month
- -