Text Generation
Transformers
Safetensors
English
gpt2
open-reason
causal-lm
cpu
text-generation-inference
Instructions to use theworker02/open-reason-xl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use theworker02/open-reason-xl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="theworker02/open-reason-xl")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("theworker02/open-reason-xl") model = AutoModelForCausalLM.from_pretrained("theworker02/open-reason-xl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use theworker02/open-reason-xl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "theworker02/open-reason-xl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theworker02/open-reason-xl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/theworker02/open-reason-xl
- SGLang
How to use theworker02/open-reason-xl 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 "theworker02/open-reason-xl" \ --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": "theworker02/open-reason-xl", "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 "theworker02/open-reason-xl" \ --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": "theworker02/open-reason-xl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use theworker02/open-reason-xl with Docker Model Runner:
docker model run hf.co/theworker02/open-reason-xl
| { | |
| "smoke": false, | |
| "cuda": false, | |
| "backend": "cpu-host", | |
| "architecture": "gpt2-scratch", | |
| "param_count": 443719680, | |
| "n_layer": 22, | |
| "n_embd": 1280, | |
| "n_head": 20, | |
| "vocab_size": 8192, | |
| "max_seq_len": 256, | |
| "steps": 120, | |
| "requested_steps": 120, | |
| "gradient_checkpointing": true, | |
| "gradient_accumulation": 2, | |
| "batch_size": 1, | |
| "learning_rate": 0.0003, | |
| "rows": 3175, | |
| "dataset_version": "1.4.0", | |
| "final_loss": 5.811557769775391, | |
| "losses_tail": [ | |
| 6.735813140869141, | |
| 5.894803047180176, | |
| 5.694976806640625, | |
| 6.798207759857178, | |
| 6.259979724884033, | |
| 5.799972057342529, | |
| 6.757445335388184, | |
| 6.014622211456299, | |
| 6.114091396331787, | |
| 5.811557769775391 | |
| ], | |
| "hub_id_if_uploaded": "theworker02/open-reason-xl", | |
| "card_title": "Open Reason open-reason-xl (CPU)", | |
| "size_note": "This is an **XL** GPT-2-style causal LM (~450M parameters) trained from scratch on the Open Reason SFT split. It is larger than `theworker02/open-reason-large` and is **not** a 1B model and is **not** `theworker02/open-reason-1b`.", | |
| "hardware": "Host CPU (AMD64 Family 26 Model 68 Stepping 0, AuthenticAMD); torch 2.12.0+cpu; cuda_available=False; docker_installed=False; docker_used=False. NVIDIA CUDA was not used. AMD GPU/ROCm/DirectML were not used.", | |
| "docker_used": false, | |
| "docker_installed": false, | |
| "torch_version": "2.12.0+cpu", | |
| "note": "CPU causal LM. Not open-reason-1b. Not AMD GPU. No Reddit." | |
| } | |