Text Generation
Transformers
Safetensors
gpt_oss
cultural-heritage
government
fine-tuning
conversational
8-bit precision
mxfp4
Instructions to use GIST-AI/khs-llm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GIST-AI/khs-llm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GIST-AI/khs-llm") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GIST-AI/khs-llm") model = AutoModelForCausalLM.from_pretrained("GIST-AI/khs-llm", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GIST-AI/khs-llm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GIST-AI/khs-llm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GIST-AI/khs-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GIST-AI/khs-llm
- SGLang
How to use GIST-AI/khs-llm 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 "GIST-AI/khs-llm" \ --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": "GIST-AI/khs-llm", "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 "GIST-AI/khs-llm" \ --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": "GIST-AI/khs-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GIST-AI/khs-llm with Docker Model Runner:
docker model run hf.co/GIST-AI/khs-llm
Commit History
-
Update README.md
Verified signatured023334
-
Update README.md
Verified signatureb5c939d
-
Configure `<|call|>` as an EOS token (#105)
Verified signature- Configure `<|call|>` as an EOS token (6d331dc55fd81a9b8afc2e8219ec842deaae46f0) Co-authored-by: Pedro Cuenca <pcuenq@users.noreply.huggingface.co>8b193b0 -
Update README
Verified signatureClarified MXFP4 quantization callout5c98b88
-
Update chat_template.jinja (#85)
Verified signature- Update chat_template.jinja (41876e41628351e3e23273661c25adf2114bf8af) Co-authored-by: Quentin Gallouédec <qgallouedec@users.noreply.huggingface.co>bc75b44 -
Update README.md
Verified signatureef8a86a -
Update README.md
Verified signature88fa8c2 -
Update README.md
Verified signature34a49b3
-
Chat template cleanups + latest fixes (#76)
Verified signature- Chat template cleanups + latest fixes (22cf5e08d6b96b5266fc75aa4512dcbee33e8ea1) Co-authored-by: Matthew Carrigan <Rocketknight1@users.noreply.huggingface.co>988e56b
-
Remove chat_template.json (#58)
Verified signature- Delete chat_template.json (d2383d83205940a4b731a93da735cee0c4f30ce0) Co-authored-by: Matthew Carrigan <Rocketknight1@users.noreply.huggingface.co>eabf0c5
-
Update README
Verified signature4c0fa49 -
Update LICENSE
Verified signaturea9cc02b -
Update vLLM command
Verified signaturea040b35 -
Add model card
Verified signatureacd9ca9 -
Upload folder using huggingface_hub
Verified signaturef39accd -
Upload folder using huggingface_hub
Verified signatureed282e6
-
Upload folder using huggingface_hub
Verified signature8c05803 -
initial commit
Verified signature62af5b1