Text Generation
Transformers
Safetensors
Japanese
llama
causal-lm
japanese
sentencepiece
research
text-generation-inference
Instructions to use hillfieldhonest/aozoranemo292m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hillfieldhonest/aozoranemo292m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hillfieldhonest/aozoranemo292m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hillfieldhonest/aozoranemo292m") model = AutoModelForCausalLM.from_pretrained("hillfieldhonest/aozoranemo292m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hillfieldhonest/aozoranemo292m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hillfieldhonest/aozoranemo292m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hillfieldhonest/aozoranemo292m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hillfieldhonest/aozoranemo292m
- SGLang
How to use hillfieldhonest/aozoranemo292m 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 "hillfieldhonest/aozoranemo292m" \ --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": "hillfieldhonest/aozoranemo292m", "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 "hillfieldhonest/aozoranemo292m" \ --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": "hillfieldhonest/aozoranemo292m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hillfieldhonest/aozoranemo292m with Docker Model Runner:
docker model run hf.co/hillfieldhonest/aozoranemo292m
aozoranemo292m
Japanese mini LLM (~292M params). SentencePiece 16k.
- Parameters: 292,478,784
- Tokenizer: SentencePiece 16k
- Best checkpoint (logs):
checkpoint-100(継続学習は step=600 まで)
Training data (references)
- Aozora Bunko (clean): https://huggingface.co/datasets/globis-university/aozorabunko-clean
- Nemotron Personas (Japan): https://huggingface.co/blog/nvidia/nemotron-personas-japan?linkId=100000383918769 ※ 各データのライセンスに従ってご利用ください。
Quick start
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
repo = "hillfieldhonest/aozoranemo292m"
tok = AutoTokenizer.from_pretrained(repo, use_fast=False)
if tok.pad_token is None: tok.pad_token = tok.eos_token
dtype = (torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported()
else torch.float16 if torch.cuda.is_available() else torch.float32)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=dtype, device_map="auto").eval()
out = model.generate(**tok("2文以内で自己紹介して。", return_tensors="pt").to(model.device),
max_new_tokens=96, do_sample=True, temperature=0.7, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))
License
- Weights: Apache-2.0(暫定。必要に応じて調整)
- Data: 上記参照先の規定に準拠
- Downloads last month
- 3