Instructions to use AdityaPS/SpaceLLM_v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AdityaPS/SpaceLLM_v1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-20b") model = PeftModel.from_pretrained(base_model, "AdityaPS/SpaceLLM_v1") - Transformers
How to use AdityaPS/SpaceLLM_v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AdityaPS/SpaceLLM_v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AdityaPS/SpaceLLM_v1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AdityaPS/SpaceLLM_v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdityaPS/SpaceLLM_v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdityaPS/SpaceLLM_v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AdityaPS/SpaceLLM_v1
- SGLang
How to use AdityaPS/SpaceLLM_v1 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 "AdityaPS/SpaceLLM_v1" \ --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": "AdityaPS/SpaceLLM_v1", "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 "AdityaPS/SpaceLLM_v1" \ --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": "AdityaPS/SpaceLLM_v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AdityaPS/SpaceLLM_v1 with Docker Model Runner:
docker model run hf.co/AdityaPS/SpaceLLM_v1
| { | |
| "run_id": "20260609_185647", | |
| "version": "v4", | |
| "base_model": "openai/gpt-oss-20b", | |
| "strategy": "LoRA on lm_head ONLY \u2014 backbone frozen \u2014 BF16", | |
| "key_fixes_vs_v3_fixed": [ | |
| "lm_head weight untied (detach+clone) BEFORE get_peft_model()", | |
| "resize_token_embeddings tie-re-introduction guard added", | |
| "lora_r raised 16\u219232, lora_alpha raised 64\u2192128", | |
| "grad_accum raised 16\u219232, lr raised 1e-4\u21922e-4", | |
| "max_grad_norm tightened 0.5\u21920.3, weight_decay=0.01 added", | |
| "EarlyStoppingCallback added", | |
| "scheduler changed cosine\u2192cosine_with_restarts", | |
| "optimizer changed adamw_torch\u2192adamw_torch_fused" | |
| ], | |
| "lora_r": 32, | |
| "lora_alpha": 128, | |
| "lora_dropout": 0.1, | |
| "target_modules": [ | |
| "lm_head" | |
| ], | |
| "epochs": 15, | |
| "learning_rate": 0.0002, | |
| "max_grad_norm": 0.3, | |
| "weight_decay": 0.01, | |
| "batch_size": 1, | |
| "gradient_accumulation": 32, | |
| "effective_batch_size": 32, | |
| "max_seq_len": 2048, | |
| "train_samples": 5291, | |
| "val_samples": 5291, | |
| "test_samples": 5291, | |
| "train_metrics": { | |
| "train_runtime": 24397.0057, | |
| "train_samples_per_second": 3.253, | |
| "train_steps_per_second": 0.102, | |
| "total_flos": 2.486936885562409e+18, | |
| "train_loss": 28.171284981233526, | |
| "epoch": 15.0 | |
| }, | |
| "eval_metrics": { | |
| "eval_loss": 1.5277799367904663, | |
| "eval_runtime": 412.216, | |
| "eval_samples_per_second": 12.836, | |
| "eval_steps_per_second": 12.836, | |
| "epoch": 15.0 | |
| }, | |
| "test_results_summary": { | |
| "mean_test_loss": 1.593661, | |
| "exact_match_rate": 0.0, | |
| "mean_token_f1": 0.270723 | |
| }, | |
| "final_adapter_dir": "/mnt/DATA/saurabh/aditya/SpaceLLM/fine_tuning_v2/outputs/spacellm_lora_final", | |
| "checkpoints_dir": "/mnt/DATA/saurabh/aditya/SpaceLLM/fine_tuning_v2/outputs/checkpoints", | |
| "graphs_dir": "/mnt/DATA/saurabh/aditya/SpaceLLM/fine_tuning_v2/outputs/graphs", | |
| "log_file": "/mnt/DATA/saurabh/aditya/SpaceLLM/fine_tuning_v2/outputs/logs/train_20260609_185647.log" | |
| } |