Instructions to use gaon12/haru with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gaon12/haru with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gaon12/haru", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("gaon12/haru", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gaon12/haru with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gaon12/haru" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gaon12/haru", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gaon12/haru
- SGLang
How to use gaon12/haru 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 "gaon12/haru" \ --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": "gaon12/haru", "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 "gaon12/haru" \ --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": "gaon12/haru", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gaon12/haru with Docker Model Runner:
docker model run hf.co/gaon12/haru
Haru v1.0
Legacy release: Haru v1.1 is now available at gaon12/haru_1.1. New users should start with v1.1. This repository remains available for reproducibility and existing v1.0 users.
Haru is a compact Korean story continuation model built with the custom CFRD causal architecture. It has 6,793,363 parameters and supports recurrent inference depths 2, 4, and 6.
Usage
Review the included Python files before enabling remote custom code.
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "gaon12/haru"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, trust_remote_code=True)
inputs = tokenizer("์์ ๋ง์์ ์์นจ์ด ์ฐพ์์์ด์.", return_tensors="pt")
output = model.generate(
**inputs,
max_new_tokens=120,
do_sample=True,
temperature=0.7,
top_p=0.9,
top_k=40,
repetition_penalty=1.08,
use_cache=False,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Model details
- Parameters: 6,793,363
- Context length: 512
- Recurrent depths supervised during training: (2, 4, 6)
- Exported checkpoint step: 6104
- Training tokens seen: 800,063,488
Evaluation
| Recurrent depth | Validation loss | Perplexity |
|---|---|---|
| 2 | 2.37096 | 10.708 |
| 4 | 2.06052 | 7.850 |
| 6 | 2.00630 | 7.436 |
Training data attribution
Tiny-Ko-Stories by psymon, licensed under CC BY 4.0. The dataset is not redistributed with this model.
Limitations
- Haru is a continuation model, not an instruction-following assistant.
- Longer generations can repeat ideas or drift between entities.
- The model is not suitable for factual or safety-critical use.
- There is no inference cache yet, so generation recomputes the active context.
License
Haru model weights and included code are released under the MIT License. The training dataset remains under its separate CC BY 4.0 license.
- Downloads last month
- -