Text Generation
Transformers
Safetensors
PyTorch
English
gpt2
causal-lm
transformer
small-language-model
instruction-tuning
character-level
educational
research
conversational
text-generation-inference
Instructions to use Hai929/The_GuageLLM_23M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hai929/The_GuageLLM_23M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hai929/The_GuageLLM_23M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Hai929/The_GuageLLM_23M") model = AutoModelForCausalLM.from_pretrained("Hai929/The_GuageLLM_23M") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Hai929/The_GuageLLM_23M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hai929/The_GuageLLM_23M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hai929/The_GuageLLM_23M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Hai929/The_GuageLLM_23M
- SGLang
How to use Hai929/The_GuageLLM_23M 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 "Hai929/The_GuageLLM_23M" \ --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": "Hai929/The_GuageLLM_23M", "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 "Hai929/The_GuageLLM_23M" \ --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": "Hai929/The_GuageLLM_23M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Hai929/The_GuageLLM_23M with Docker Model Runner:
docker model run hf.co/Hai929/The_GuageLLM_23M
GuageLLM-12M
GuageLLM-23M is a lightweight GPT-style language model (~23 million parameters) trained from scratch for experimentation, learning, and fast local inference.
This model is designed to be simple, transparent, and easy to run on CPUs while still demonstrating real transformer behavior.
๐น Model Details
- Architecture: GPT-2 style (decoder-only transformer)
- Parameters: ~23M
- Context Length: 64 tokens
- Vocabulary Size: Custom tokenizer
- Training: From scratch
- Framework: ๐ค Transformers (PyTorch)
๐น Intended Use
GuageLLM-23M is intended for:
- Learning how transformers work internally
- Small-scale text generation experiments
- CPU-friendly inference
- Research, education, and tinkering
โ ๏ธ This model is not intended for production or safety-critical applications.
๐น Usage
Text Generation (Pipeline)
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="Hai929/GuageLLM_23M",
trust_remote_code=True
)
pipe("The cat")
- Downloads last month
- 1,133