Instructions to use LoNebula/my-tiny-llama-ja with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LoNebula/my-tiny-llama-ja with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LoNebula/my-tiny-llama-ja")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LoNebula/my-tiny-llama-ja") model = AutoModelForCausalLM.from_pretrained("LoNebula/my-tiny-llama-ja", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LoNebula/my-tiny-llama-ja with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LoNebula/my-tiny-llama-ja" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LoNebula/my-tiny-llama-ja", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LoNebula/my-tiny-llama-ja
- SGLang
How to use LoNebula/my-tiny-llama-ja 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 "LoNebula/my-tiny-llama-ja" \ --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": "LoNebula/my-tiny-llama-ja", "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 "LoNebula/my-tiny-llama-ja" \ --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": "LoNebula/my-tiny-llama-ja", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LoNebula/my-tiny-llama-ja with Docker Model Runner:
docker model run hf.co/LoNebula/my-tiny-llama-ja
my-tiny-llama-ja
A compact Japanese-language causal language model. The repository now includes a standard Transformers checkpoint alongside the original PyTorch state dictionary and tokenizer.
Use this model
Install the runtime:
pip install torch transformers safetensors
Transformers pipeline
from transformers import pipeline
generator = pipeline(
"text-generation",
model="LoNebula/my-tiny-llama-ja",
tokenizer="LoNebula/my-tiny-llama-ja",
)
result = generator("日本語:", max_new_tokens=64, do_sample=False)
print(result[0]["generated_text"])
Transformers classes
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "LoNebula/my-tiny-llama-ja"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id)
inputs = tokenizer("日本語:", return_tensors="pt")
inputs.pop("token_type_ids", None)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))
The Hub files support the standard transformers text-generation pipeline and AutoModelForCausalLM. CPU inference is available; a CUDA-enabled PyTorch installation can be used for GPU inference. Hosted inference requires a compatible Inference Provider or a separately deployed Inference Endpoint.
Model details
| Property | Details |
|---|---|
| Architecture | LLaMA-style decoder-only causal language model |
| Vocabulary | 32,000-token custom ByteLevel BPE tokenizer |
| Layers | 6 |
| Hidden size | 512 |
| Feed-forward size | 1,536 |
| License | MIT |
| Task | Japanese text generation |
The original upload contained trained_model.pth and custom_tokenizer.json, but no model configuration or implementation. The Transformers conversion maps the original state-dict tensors into the standard LLaMA tensor names. The 8 attention heads, 2,048-token context setting, RMSNorm epsilon, and RoPE base in the conversion config are compatibility assumptions because the original training configuration was not included. The checkpoint can be loaded and run with Transformers, but these inferred settings may differ from its training-time settings.
The original files remain available in this repository for reproducibility. model.safetensors, config.json, tokenizer.json, and the tokenizer metadata enable standard Transformers loading without trust_remote_code.
Intended use
- Small-scale Japanese text-generation experiments
- Learning and prototyping with a compact causal language model
- Research into custom Japanese tokenizers and lightweight model conversion
This is a base language model, not an instruction-tuned assistant. It may continue a prompt unpredictably and should not be relied on for factual answers.
Limitations and provenance
The original training data, training procedure, evaluation results, and exact model hyperparameters were not included with the published checkpoint. The configuration values above that cannot be read from tensor shapes are explicitly marked as assumptions. Generation quality has not been benchmarked. Review generated text before reuse.
This is a text-only causal language model. It is not an image, audio, or diffusion model; Diffusers and vision/audio pipelines do not apply.
License
The model is published under the MIT License. See the MIT License text for the full terms.
Citation
@misc{lonebula2025tinyllamaja,
author = {LoNebula},
title = {my-tiny-llama-ja: A Tiny Japanese Language Model},
year = {2025},
url = {https://huggingface.co/LoNebula/my-tiny-llama-ja}
}
- Downloads last month
- 25