Instructions to use FrontiersMind/Nandi-Mini-150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FrontiersMind/Nandi-Mini-150M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FrontiersMind/Nandi-Mini-150M", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FrontiersMind/Nandi-Mini-150M", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FrontiersMind/Nandi-Mini-150M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FrontiersMind/Nandi-Mini-150M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FrontiersMind/Nandi-Mini-150M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FrontiersMind/Nandi-Mini-150M
- SGLang
How to use FrontiersMind/Nandi-Mini-150M 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 "FrontiersMind/Nandi-Mini-150M" \ --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": "FrontiersMind/Nandi-Mini-150M", "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 "FrontiersMind/Nandi-Mini-150M" \ --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": "FrontiersMind/Nandi-Mini-150M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FrontiersMind/Nandi-Mini-150M with Docker Model Runner:
docker model run hf.co/FrontiersMind/Nandi-Mini-150M
Interesting Architectural design
Hi, really amazing work.
The architecture design caught my attention like you are doing 3x upsamling for hidden features in the MLP layers. General norm is 4x, the layer sharing and 832 embedding dimension. Curious to know about the experimentation done, finding and failed attempts.
Also, is this purely empirical or depends on other foundational work.
Hoping you will cover all of this in upcoming blog.
Hi, thanks a lot, really appreciate it!
Great question. The 4× intermediate size in MLPs is the standard for non-GLU variants, but for GLU-based variants we typically use ~3×. That’s because GLU involves three matrix multiplications, so the overall parameter count and compute end up being quite comparable to a 4× non-GLU setup.
On layer sharing, yes, that was a deliberate choice. At ~150M scale, models tend to have limited capacity, so sharing layers effectively increases the depth (you can think of it as ~2× effective layers), which helps improve performance without a proportional increase in parameters.
We did run multiple ablations and iterations before converging on this design, it wasn’t a one-shot decision. Some configurations didn’t perform as well in terms of stability and efficiency, which guided us toward the current setup.
Right now, we’re pre-training larger models (500M and 1B). Once that’s done, we’re planning to publish a detailed technical report covering the architecture decisions, experiments, and lessons learned.
Great!
Thanks for the response. Hope you will cover failed experiments and ablations as well.
Rooting for you!