Text Generation
Transformers
Safetensors
English
k2_horizon
k2-horizon
7b
dense
open-weights
ifm
conversational
custom_code
Instructions to use IFM/K2-Horizon-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/K2-Horizon-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/K2-Horizon-7B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IFM/K2-Horizon-7B", trust_remote_code=True, device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/K2-Horizon-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/K2-Horizon-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IFM/K2-Horizon-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IFM/K2-Horizon-7B
- SGLang
How to use IFM/K2-Horizon-7B 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 "IFM/K2-Horizon-7B" \ --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": "IFM/K2-Horizon-7B", "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 "IFM/K2-Horizon-7B" \ --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": "IFM/K2-Horizon-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IFM/K2-Horizon-7B with Docker Model Runner:
docker model run hf.co/IFM/K2-Horizon-7B
Commit History
Preserve checkpoint history: sft_1_2000 446bf31
HF release automation commited on
Preserve checkpoint history: sft_1_4000 c321171
HF release automation commited on
Preserve checkpoint history: sft_1_6000 e0551bc
HF release automation commited on
Preserve checkpoint history: sft_1_8000 f3f533e
HF release automation commited on
Preserve checkpoint history: sft_1_10000 d93829f
HF release automation commited on
Preserve checkpoint history: mid_4_1000 9141b9f
HF release automation commited on
Preserve checkpoint history: mid_4_2000 579c54c
HF release automation commited on
Preserve checkpoint history: mid_4_3000 23d5138
HF release automation commited on
Preserve checkpoint history: mid_4_4000 ae77b67
HF release automation commited on
Preserve checkpoint history: mid_4_5000 2d4edf6
HF release automation commited on
Preserve checkpoint history: mid_4_6000 626833b
HF release automation commited on
Preserve checkpoint history: mid_4_7000 6618868
HF release automation commited on
Preserve checkpoint history: mid_4_8000 5b4916c
HF release automation commited on
Preserve checkpoint history: mid_4_9000 84992d2
HF release automation commited on
Preserve checkpoint history: mid_4_10000 36c6bd3
HF release automation commited on
Preserve checkpoint history: mid_3_500 643373c
HF release automation commited on
Preserve checkpoint history: mid_3_1000 8c15fd1
HF release automation commited on
Preserve checkpoint history: mid_3_1500 6ce9336
HF release automation commited on
Preserve checkpoint history: mid_3_2000 16c0428
HF release automation commited on
Preserve checkpoint history: mid_3_2500 8ba253d
HF release automation commited on
Preserve checkpoint history: mid_3_3000 2182b17
HF release automation commited on
Preserve checkpoint history: mid_3_3500 0b3d5a7
HF release automation commited on
Preserve checkpoint history: mid_3_4000 8ae2f96
HF release automation commited on
Preserve checkpoint history: mid_3_4500 8999cdc
HF release automation commited on
Preserve checkpoint history: mid_3_5000 52a52a2
HF release automation commited on
Preserve checkpoint history: mid_3_5500 e4deff2
HF release automation commited on
Preserve checkpoint history: mid_2_2500 fdfaa2e
HF release automation commited on
Preserve checkpoint history: mid_2_5000 c758aca
HF release automation commited on
Preserve checkpoint history: mid_2_7500 f2ca46d
HF release automation commited on
Preserve checkpoint history: mid_2_10000 424075e
HF release automation commited on
Preserve checkpoint history: mid_2_12500 56aabf0
HF release automation commited on
Preserve checkpoint history: mid_2_15000 9b33c0a
HF release automation commited on
Preserve checkpoint history: mid_2_17500 f22b8f9
HF release automation commited on
Preserve checkpoint history: mid_2_20000 488e52a
HF release automation commited on
Preserve checkpoint history: mid_2_22500 56d5bf4
HF release automation commited on
Preserve checkpoint history: mid_2_25000 565d0d4
HF release automation commited on
Preserve checkpoint history: mid_1_5000 f6b58c1
HF release automation commited on
Preserve checkpoint history: mid_1_10000 15a9500
HF release automation commited on
Preserve checkpoint history: mid_1_15000 7afda4b
HF release automation commited on
Preserve checkpoint history: mid_1_20000 26bba8e
HF release automation commited on
Preserve checkpoint history: mid_1_25000 f8bbf3d
HF release automation commited on
Preserve checkpoint history: mid_1_30000 7224482
HF release automation commited on
Preserve checkpoint history: mid_1_35000 81edfe4
HF release automation commited on
Preserve checkpoint history: mid_1_40000 3983900
HF release automation commited on
Preserve checkpoint history: mid_1_45000 7c362fa
HF release automation commited on
Preserve checkpoint history: mid_1_50000 d0d38fb
HF release automation commited on
Preserve checkpoint history: mid_1_55000 c2216e8
HF release automation commited on
Order checkpoint tag mid_1_55000 b80f672
HF release automation commited on
Order checkpoint tag mid_1_50000 397f69b
HF release automation commited on