Instructions to use josephmayo/HRM-Text-1B-sft-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use josephmayo/HRM-Text-1B-sft-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="josephmayo/HRM-Text-1B-sft-code")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("josephmayo/HRM-Text-1B-sft-code") model = AutoModelForMultimodalLM.from_pretrained("josephmayo/HRM-Text-1B-sft-code") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use josephmayo/HRM-Text-1B-sft-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josephmayo/HRM-Text-1B-sft-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "josephmayo/HRM-Text-1B-sft-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/josephmayo/HRM-Text-1B-sft-code
- SGLang
How to use josephmayo/HRM-Text-1B-sft-code 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 "josephmayo/HRM-Text-1B-sft-code" \ --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": "josephmayo/HRM-Text-1B-sft-code", "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 "josephmayo/HRM-Text-1B-sft-code" \ --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": "josephmayo/HRM-Text-1B-sft-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use josephmayo/HRM-Text-1B-sft-code with Docker Model Runner:
docker model run hf.co/josephmayo/HRM-Text-1B-sft-code
HRM-Text-1B-sft-code
Merged code post-training release from sapientinc/HRM-Text-1B plus:
josephmayo/HRM-Text-1B-sft-code-LoRA
sapientinc/HRM-Text-1B is a pretrained-only HRM text model. This merged release packages the code post-trained LoRA into the base weights for direct use.
Training Summary
- Base model:
sapientinc/HRM-Text-1B - Method: supervised LoRA post-training, then merged into base weights
- Training rows:
384 - Max steps:
120 - LoRA rank:
64 - Learning rate:
8e-6 - Final train loss:
0.3275703112284342
Validation
Local code validation:
- Base model score:
5/100 - Merged model score:
24/100 - Absolute improvement:
+19/100 - Relative improvement:
4.8xover base - HumanEval slice:
14/50 - MBPP slice:
10/50
The score above is the local validation result used for this release.
Use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "josephmayo/HRM-Text-1B-sft-code"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
model.eval()
Notes
- This is the merged release of the LoRA.
- Adapter repo:
josephmayo/HRM-Text-1B-sft-code-LoRA
- Downloads last month
- 99
Model tree for josephmayo/HRM-Text-1B-sft-code
Base model
sapientinc/HRM-Text-1B