Instructions to use SupraLabs/Supra-Mini-v4-2M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/Supra-Mini-v4-2M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SupraLabs/Supra-Mini-v4-2M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SupraLabs/Supra-Mini-v4-2M") model = AutoModelForCausalLM.from_pretrained("SupraLabs/Supra-Mini-v4-2M") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SupraLabs/Supra-Mini-v4-2M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SupraLabs/Supra-Mini-v4-2M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SupraLabs/Supra-Mini-v4-2M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SupraLabs/Supra-Mini-v4-2M
- SGLang
How to use SupraLabs/Supra-Mini-v4-2M 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 "SupraLabs/Supra-Mini-v4-2M" \ --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": "SupraLabs/Supra-Mini-v4-2M", "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 "SupraLabs/Supra-Mini-v4-2M" \ --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": "SupraLabs/Supra-Mini-v4-2M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SupraLabs/Supra-Mini-v4-2M with Docker Model Runner:
docker model run hf.co/SupraLabs/Supra-Mini-v4-2M
Awesome
Cool implementation, could prob get away with a higher learning rate and more depth over width (would also help with tokenizer size).
Whats ur activation?
Hey thanks!
I use standard HF Transformers with Llama architecture.
See the full code in this repos' files list as train.py π
Ahh sweet, would probably be worth dropping ur intermediate dim multipler to 2.67-3x and investing further into depth, swiglu at 4x is pretty overweighted
Also big fan of the little competition going on, cool to see some action in the small model community, almost tempted to train a competitor haha. What parameter limit are you guys using?
Thank! Good tips! :-)
Of course you can train a competitor. I think ~3M should be the top limit. But 0.5M - 2M is more likely :-)
Have fun :D
or join us, lol...if you want. wanna?
I appreciate the invite but currently got my hands full with axiomic labs and getting the next gen GPT-X model out.
Keep up the great work tho!
Competitor in the works!
lol this is amazing
Oh Harley you joined, Sweet!
Do you also want to join? come on, PLEASE! β€οΈ
yo he already said no.
yo they already said no. they are also a new competitor, if im not mistaken
what?! nah hf broken or some shi
Haha nah Ill think abt it, would like to get the next few versions of gpt-x out so cant exactly promise ill contribute very much in the short term
ok!
Oh also you guys got discord or smth? I feel like there should be a better way to dm then a hf discussion haha lol
Yes. My discord is "harleyml."
yeah, my discord name is "lh_tech_ai".