Instructions to use IFM/K2-Horizon-0.9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/K2-Horizon-0.9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/K2-Horizon-0.9B", 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-0.9B", trust_remote_code=True, device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/K2-Horizon-0.9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/K2-Horizon-0.9B" # 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-0.9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IFM/K2-Horizon-0.9B
- SGLang
How to use IFM/K2-Horizon-0.9B 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-0.9B" \ --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-0.9B", "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-0.9B" \ --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-0.9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IFM/K2-Horizon-0.9B with Docker Model Runner:
docker model run hf.co/IFM/K2-Horizon-0.9B
K2-Horizon-0.9B License Clarification
Hello,
I have a question about the licensing/usage terms for IFM/K2-Horizon-0.9B.
The Hugging Face repository currently identifies the model as Apache-2.0, but I noticed residual metadata associated with the model that appears to indicate internal-only.
Could you please clarify which status is authoritative?
Specifically:
Are the
internal-onlyfields intentional and currently applicable to K2-Horizon-0.9B, or are they stale/incorrect metadata?If they are stale, is there an authoritative revision or repository update that corrects them?
Is Apache-2.0 the governing license for the released model and weights?
Does that license/status permit:
- research and evaluation;
- local inference/use;
- fine-tuning or other derivative work;
- redistribution;
- commercial use?
If there is a specific LICENSE file, commit, or first-party document that governs these rights, a link to it would be greatly appreciated.
Thank you.
Hi, @Vo-Tron
For your questions:
- No, there are no intentional
internal-onlyfield from our side. Could you also help point out what that is? We can investigate and correct the metadata. - We will if we can identify them.
- Yes it is Apache-2.0
- Yes that's the implication of the license and our goal for open source
- We will check. If we miss the upload we will do so.
Thank you. The fields I was referring to are in the README front matter:
license_name: internal-only
license_link: LICENSE
I also observed the same licensing pattern on the -0.9B-GGUF repository.
That appears inconsistent with the repository's Apache-2.0 designation and your clarification above. I wanted to point you to the exact fields you asked about.
Thank you for checking.
This is actually a mistake when we batch processed our documents. We will fix these.
Thanks for catching this!