Text Generation
Transformers
Safetensors
English
engram_qwen3
microllama
qwen3
engram
pretraining
small-language-model
custom_code
Instructions to use keeeeenw/MicroLlama2-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keeeeenw/MicroLlama2-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="keeeeenw/MicroLlama2-base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("keeeeenw/MicroLlama2-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use keeeeenw/MicroLlama2-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keeeeenw/MicroLlama2-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keeeeenw/MicroLlama2-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/keeeeenw/MicroLlama2-base
- SGLang
How to use keeeeenw/MicroLlama2-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 "keeeeenw/MicroLlama2-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": "keeeeenw/MicroLlama2-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 "keeeeenw/MicroLlama2-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": "keeeeenw/MicroLlama2-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use keeeeenw/MicroLlama2-base with Docker Model Runner:
docker model run hf.co/keeeeenw/MicroLlama2-base
Download checkpoint_source.json from keeeeenw/MicroLlama2-base: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/keeeeenw/MicroLlama2-base/resolve/main/checkpoint_source.json
- Command line
-
hf download hf://keeeeenw/MicroLlama2-base/checkpoint_source.json
-
curl -L -o checkpoint_source.json https://huggingface.co/keeeeenw/MicroLlama2-base/resolve/main/checkpoint_source.json
1.02 kB
| { | |
| "source_repo": "keeeeenw/MicroLlama2-388M-checkpoints", | |
| "source_revision": "527ab4101332284704765e1b2f3cfb577609bf56", | |
| "source_prefix": "checkpoint/fineweb-edu-338m-8k-local-engram-4090/step-00381824", | |
| "step": 381824, | |
| "valid_targets": 50000054177, | |
| "weight_sha256": "76ad5c973bae0219f81b1f56f92ff6e8bb1f9404ed700c237096138d2689bceb", | |
| "weight_bytes": 1552149028, | |
| "checkpoint_manifest_sha256": "9968e0d8db74a6618750ca38c71e68332c3947921f8dd75a591415afd965840c", | |
| "weight_changes": false, | |
| "inference_metadata_changes": [ | |
| "Added Auto class remote-code mappings", | |
| "Enabled generation cache and greedy default; suppressed unused vocabulary/control tokens except EOS", | |
| "Did not expose inherited upstream chat template: this is a plain-text base model" | |
| ], | |
| "adapter": "Transformers 5.20.2 Qwen3 API with the original Engram operations and explicit generation-state carry", | |
| "training_code_and_technical_report": "Links coming shortly", | |
| "previous_source_repo": "keeeeenw/MicroLlama2" | |
| } | |