Text Generation
Transformers
Safetensors
Portuguese
gpt2
base
pretrain
pretrained
nano
mini
chatbot
text-generation-inference
Instructions to use AxionLab-official/MiniBot-0.9M-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AxionLab-official/MiniBot-0.9M-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AxionLab-official/MiniBot-0.9M-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AxionLab-official/MiniBot-0.9M-Base") model = AutoModelForCausalLM.from_pretrained("AxionLab-official/MiniBot-0.9M-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AxionLab-official/MiniBot-0.9M-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AxionLab-official/MiniBot-0.9M-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxionLab-official/MiniBot-0.9M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AxionLab-official/MiniBot-0.9M-Base
- SGLang
How to use AxionLab-official/MiniBot-0.9M-Base 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 "AxionLab-official/MiniBot-0.9M-Base" \ --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": "AxionLab-official/MiniBot-0.9M-Base", "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 "AxionLab-official/MiniBot-0.9M-Base" \ --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": "AxionLab-official/MiniBot-0.9M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AxionLab-official/MiniBot-0.9M-Base with Docker Model Runner:
docker model run hf.co/AxionLab-official/MiniBot-0.9M-Base
Fix parameter count: card said ~900K, checkpoint is 985,728 Verified against the safetensors artifact: wte 1375x128 = 176,000 wpe 128x128 = 16,384 4 x (attn.c_attn 128x128 + attn.c_proj 128x128 + mlp.c_fc 128x512 + mlp.c_proj 512x128) = 4 x 49,568 = 198,272 ln_f 128 = 128 ------------------------------------------ total = 985,728 tie_word_embeddings=true, so lm_head adds 0. 985,728 is ~9.5% higher than the ~900K on the card. Updated the badge, tagline, overview, table and disclaimer to ~985K. No change to architecture, weights or any other field.
#2
by Compactbot - opened
No description provided.
AxionLab-official changed pull request status to merged
thx
im so glad compactbot is actually helping and not randomly adding notes into readme's 🥳
