Instructions to use glouriousgautam/LiLM1-230M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use glouriousgautam/LiLM1-230M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="glouriousgautam/LiLM1-230M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("glouriousgautam/LiLM1-230M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use glouriousgautam/LiLM1-230M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "glouriousgautam/LiLM1-230M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "glouriousgautam/LiLM1-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/glouriousgautam/LiLM1-230M
- SGLang
How to use glouriousgautam/LiLM1-230M 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 "glouriousgautam/LiLM1-230M" \ --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": "glouriousgautam/LiLM1-230M", "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 "glouriousgautam/LiLM1-230M" \ --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": "glouriousgautam/LiLM1-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use glouriousgautam/LiLM1-230M with Docker Model Runner:
docker model run hf.co/glouriousgautam/LiLM1-230M
LiLM1-230M
LiLM1-230M is a compact language model for controlled tool use. It has 233,897,728 parameters and a 4,096-token context. A 4:8 general-to-tool mix worked best for this specific model.
IFEval, GSM8K, and TruthfulQA use the full suites. BBH and MMLU-Pro use fixed 50% samples.
| Suite | LiLM1-230M | SmolLM2 135M Instruct | LFM2.5 230M | SmolLM2 360M Instruct |
|---|---|---|---|---|
| IFEval | 15.5 | 21.8 | 65.8 | 32.2 |
| GSM8K | 1.8 | 1.4 | 29.0 | 9.3 |
| TruthfulQA MC2 | 41.3 | 40.9 | 41.4 | 40.4 |
| BBH | 21.9 | 22.2 | 21.8 | 27.0 |
| MMLU-Pro | 8.4 | 6.3 | 7.1 | 8.8 |
Load
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "glouriousgautam/LiLM1-230M"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo,
trust_remote_code=True,
dtype=torch.bfloat16,
)
The architecture is custom. Loading requires trust_remote_code=True.
Use
Use a runtime controller for every tool call. The controller must validate the schema, required fields, permissions, execution, and result. Do not use the model for unsupervised consequential actions. Do not use context longer than 4,096 tokens.
| Field | Value |
|---|---|
| Developer | Akshay Gautam |
| Parameters | 233,897,728 |
| Context | 4,096 tokens |
| Pretraining | 40B token exposures |
| Post-training mix | 4 parts general data to 8 parts tool data |
| Tokenizer | SmolLM2 135M tokenizer |
| Source checkpoint SHA-256 | fe6f8dc5e340eead39e1825abc32474cc48636895e253df93635d74791f4dc0e |
| Safetensors SHA-256 | ff0421a9ce25cafecd62861468b6a48a5f584e975e085f62d342a8cc7ac747f7 |
| License | Apache-2.0 |
License
Apache License 2.0.
- Downloads last month
- -
