Instructions to use afrizalha/Sasando-1-7M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use afrizalha/Sasando-1-7M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="afrizalha/Sasando-1-7M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("afrizalha/Sasando-1-7M") model = AutoModelForCausalLM.from_pretrained("afrizalha/Sasando-1-7M") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use afrizalha/Sasando-1-7M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "afrizalha/Sasando-1-7M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "afrizalha/Sasando-1-7M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/afrizalha/Sasando-1-7M
- SGLang
How to use afrizalha/Sasando-1-7M 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 "afrizalha/Sasando-1-7M" \ --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": "afrizalha/Sasando-1-7M", "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 "afrizalha/Sasando-1-7M" \ --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": "afrizalha/Sasando-1-7M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use afrizalha/Sasando-1-7M with Docker Model Runner:
docker model run hf.co/afrizalha/Sasando-1-7M
Descaling low-resource language models
Sasando-1 is a tiny, highly experimental short-sequence text generator built using the Phi-3 architecture.
โGo straight to the gradio demoโ
This repo contains the 7M version
Preliminary research preview
๐ป Welcome!
Sasando-1 is a tiny, highly experimental Indonesian text generator built using the Phi-3 architecture. It comes with two variations of microscopic sizes: 7M and 25M parameters. It is trained on a tightly-controlled Indo4B dataset filtered to only have 18000 unique words. The method is inspired by Microsoft's TinyStories paper which demonstrates that a tiny language model can produce fluent text when trained on tightly-controlled dataset.
๐ฎ๐ฉ Context
Indonesia has +700 languages, and many of them are dying at an alarming rate. Language technologies like generative AI can play a massive role in language preservation. However, Indonesia has several contextual issues:
- Many languages, including those with millions of speakers, have low-volume digital resources
- Running large models can be costly, while Indonesia is a middle-income country with little funding
Overcoming these challenges require developers to work with what little data and money that they have. Sasando-1 is a prototypical demonstration that thinly-available resources can potentially still be leveraged to develop generative models with cheap compute.
โจ Specs
- Comes with 7M and 25M parameters
- Based on Phi-3 architecture
- Embedding vocab 4096
- Trained on ~257M tokens * 4 epoch
๐ญ Out-of-Scope Use
This is a research preview base model. It is not intruction-tuned and has minimal safety curation. It is not intended for commercial or practical applications.
You are also not allowed to use this model without having fun.
Acknowledgments
- Developed by: Afrizal Hasbi Azizy
- License: MIT
Training log
- Downloads last month
- 7