HuggingFaceH4/no_robots
Viewer β’ Updated β’ 10k β’ 9.33k β’ 546
How to use ZombitX64/Hanuman with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ZombitX64/Hanuman") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ZombitX64/Hanuman")
model = AutoModelForCausalLM.from_pretrained("ZombitX64/Hanuman")How to use ZombitX64/Hanuman with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ZombitX64/Hanuman"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ZombitX64/Hanuman",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ZombitX64/Hanuman
How to use ZombitX64/Hanuman with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ZombitX64/Hanuman" \
--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": "ZombitX64/Hanuman",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "ZombitX64/Hanuman" \
--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": "ZombitX64/Hanuman",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ZombitX64/Hanuman with Docker Model Runner:
docker model run hf.co/ZombitX64/Hanuman
<NL>, <SPACE>, <TAB> etc.)trust_remote_code needed) import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_ID = "ZombitX64/Hanuman"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID)
def generate_thai_text(prompt, max_length=100):
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=max_length,
temperature=0.7,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generate_thai_text("Artificial intelligence technology"))
prompts = ["Hello", "Thailand has an area of", "Education in the digital era"]
for p in prompts:
print(generate_thai_text(p, max_length=80))
print("-"*50)
training_args = {
"per_device_train_batch_size": 2,
"per_device_eval_batch_size": 2,
"gradient_accumulation_steps": 4,
"num_train_epochs": 2,
"learning_rate": 5e-5,
"warmup_steps": 10,
"logging_steps": 10,
"eval_steps": 50,
"save_steps": 50,
"fp16": False, # CPU training
"dataloader_num_workers": 0
}
The model is currently in research phase. Formal evaluation results (perplexity, Thai downstream benchmarks) will be added in the future.
This project is part of ongoing Thai NLP research. Feedback, issues, and contributions are welcome!
@misc{Hanuman2025,
title = {Hanuman: Thai Small Language Model},
author = {JonusNattapong and Koichi Yasuoka},
year = {2025},
howpublished = {\url{https://huggingface.co/ZombitX64/Hanuman}},
note = {Tokenizer advisor: Koichi Yasuoka}
}
β οΈ Disclaimer: This model is intended for research and educational purposes only. Use in commercial applications requires prior permission under the CC BY-NC 4.0 license.