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
README.md
CHANGED
|
@@ -15,18 +15,18 @@ library_name: transformers
|
|
| 15 |
|
| 16 |
# π§ MiniBot-0.9M-Base
|
| 17 |
|
| 18 |
-
> **Ultra-lightweight GPT-2 style language model (~
|
| 19 |
|
| 20 |
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Base)
|
| 21 |
[](https://opensource.org/licenses/MIT)
|
| 22 |
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Base)
|
| 23 |
-
[ model** β trained purely for next-token prediction, with no instruction tuning or alignment of any kind. It serves as the foundation for fine-tuned variants such as [MiniBot-0.9M-Instruct](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Instruct).
|
| 32 |
|
|
@@ -39,7 +39,7 @@ This is a **base (pretrained) model** β trained purely for next-token predicti
|
|
| 39 |
| π§π· **Language** | Portuguese (primary) |
|
| 40 |
| π§ **Architecture** | GPT-2 style (Transformer decoder-only) |
|
| 41 |
| π€ **Embeddings** | GPT-2 compatible |
|
| 42 |
-
| π **Parameters** | ~
|
| 43 |
| βοΈ **Objective** | Causal Language Modeling (next-token prediction) |
|
| 44 |
| π« **Alignment** | None (base model) |
|
| 45 |
|
|
@@ -104,7 +104,6 @@ pip install transformers torch
|
|
| 104 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 105 |
|
| 106 |
model_name = "AxionLab-official/MiniBot-0.9M-Base"
|
| 107 |
-
|
| 108 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 109 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 110 |
|
|
@@ -150,7 +149,7 @@ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
| 150 |
|
| 151 |
## β οΈ Disclaimer
|
| 152 |
|
| 153 |
-
- Extremely small model (~
|
| 154 |
- Limited world knowledge and weak generalization
|
| 155 |
- No safety or alignment measures
|
| 156 |
- **Not suitable for production use**
|
|
|
|
| 15 |
|
| 16 |
# π§ MiniBot-0.9M-Base
|
| 17 |
|
| 18 |
+
> **Ultra-lightweight GPT-2 style language model (~985K parameters) specialized in Portuguese conversational text.**
|
| 19 |
|
| 20 |
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Base)
|
| 21 |
[](https://opensource.org/licenses/MIT)
|
| 22 |
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Base)
|
| 23 |
+
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Base)
|
| 24 |
|
| 25 |
---
|
| 26 |
|
| 27 |
## π Overview
|
| 28 |
|
| 29 |
+
**MiniBot-0.9M-Base** is a tiny decoder-only Transformer (~985K parameters) based on the GPT-2 architecture, designed for efficient text generation in **Portuguese**.
|
| 30 |
|
| 31 |
This is a **base (pretrained) model** β trained purely for next-token prediction, with no instruction tuning or alignment of any kind. It serves as the foundation for fine-tuned variants such as [MiniBot-0.9M-Instruct](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Instruct).
|
| 32 |
|
|
|
|
| 39 |
| π§π· **Language** | Portuguese (primary) |
|
| 40 |
| π§ **Architecture** | GPT-2 style (Transformer decoder-only) |
|
| 41 |
| π€ **Embeddings** | GPT-2 compatible |
|
| 42 |
+
| π **Parameters** | ~985K (985,728) |
|
| 43 |
| βοΈ **Objective** | Causal Language Modeling (next-token prediction) |
|
| 44 |
| π« **Alignment** | None (base model) |
|
| 45 |
|
|
|
|
| 104 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 105 |
|
| 106 |
model_name = "AxionLab-official/MiniBot-0.9M-Base"
|
|
|
|
| 107 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 108 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 109 |
|
|
|
|
| 149 |
|
| 150 |
## β οΈ Disclaimer
|
| 151 |
|
| 152 |
+
- Extremely small model (~985K parameters)
|
| 153 |
- Limited world knowledge and weak generalization
|
| 154 |
- No safety or alignment measures
|
| 155 |
- **Not suitable for production use**
|