Instructions to use LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints", device_map="auto")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints", dtype="auto", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints
- SGLang
How to use LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints 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-OS-Models/KoHRM-Text-1.4B-raw-checkpoints" \ --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-OS-Models/KoHRM-Text-1.4B-raw-checkpoints", "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-OS-Models/KoHRM-Text-1.4B-raw-checkpoints" \ --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-OS-Models/KoHRM-Text-1.4B-raw-checkpoints", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints with Docker Model Runner:
docker model run hf.co/LLM-OS-Models/KoHRM-Text-1.4B-raw-checkpoints
| arch: | |
| H_cycles: 2 | |
| H_override: {} | |
| L_cycles: 3 | |
| bp_max_steps: 5 | |
| bp_warmup_ratio: 0.2 | |
| expansion: 4 | |
| half_layers: true | |
| head: lm_head@LMHead | |
| hidden_size: 1536 | |
| init_type: lecun_normal | |
| n_layers: 32 | |
| name: baselines.hrm_nocarry_bp_warmup@HierarchicalReasoningModel | |
| norm_eps: 1.0e-06 | |
| norm_type: pre | |
| num_heads: 12 | |
| pos_emb_type: rope | |
| rope_theta: 10000.0 | |
| beta1: 0.9 | |
| beta2: 0.95 | |
| checkpoint_interval: 1 | |
| checkpoint_keep_last: 2 | |
| checkpoint_path: /home/work/.data/hrm_text_checkpoints/KoHRM-Text-1.4B-stage1c-hrm-fastcap-repeat2-gbs180 | |
| checkpoint_step_interval: 10000 | |
| data: | |
| path: /home/work/.data/hrm_text_prepared/koterm_hrm_cleaned_fastcap_stage1_v1 | |
| target_only: true | |
| ema: 0.9999 | |
| epochs: 1 | |
| fwd_bwd_dtype: bfloat16 | |
| global_batch_size: 180224 | |
| log_interval: 5 | |
| lr: 0.00022 | |
| lr_min_ratio: 1.0 | |
| lr_warmup_steps: 2000 | |
| project_name: KoHRM-Text | |
| resume_epoch: null | |
| resume_from: /home/work/.data/hrm_text_checkpoints/KoHRM-Text-1.4B-stage4b-korean-tool-finance-repeat-gbs180 | |
| resume_step: null | |
| resume_step_offset: 470077 | |
| run_name: KoHRM-Text-1.4B-stage1c-hrm-fastcap-repeat2 | |
| seed: 0 | |
| skip_batches: 0 | |
| total_steps_override: 700000 | |
| weight_decay: 0.1 | |
| weights_only_resume_from_ema: false | |