Instructions to use jtatman/TinyMistral-248M-v2-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jtatman/TinyMistral-248M-v2-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jtatman/TinyMistral-248M-v2-4bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jtatman/TinyMistral-248M-v2-4bit") model = AutoModelForCausalLM.from_pretrained("jtatman/TinyMistral-248M-v2-4bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jtatman/TinyMistral-248M-v2-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jtatman/TinyMistral-248M-v2-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jtatman/TinyMistral-248M-v2-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jtatman/TinyMistral-248M-v2-4bit
- SGLang
How to use jtatman/TinyMistral-248M-v2-4bit 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 "jtatman/TinyMistral-248M-v2-4bit" \ --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": "jtatman/TinyMistral-248M-v2-4bit", "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 "jtatman/TinyMistral-248M-v2-4bit" \ --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": "jtatman/TinyMistral-248M-v2-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio new
How to use jtatman/TinyMistral-248M-v2-4bit with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jtatman/TinyMistral-248M-v2-4bit to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jtatman/TinyMistral-248M-v2-4bit to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jtatman/TinyMistral-248M-v2-4bit to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="jtatman/TinyMistral-248M-v2-4bit", max_seq_length=2048, ) - Docker Model Runner
How to use jtatman/TinyMistral-248M-v2-4bit with Docker Model Runner:
docker model run hf.co/jtatman/TinyMistral-248M-v2-4bit
Model Card for TinyMistral-248M-v2-4bit
A model to use with unsloth for running on cheap hardware, a la Kaggle and Colab free-tier.
Unsloth has some great ideas about optimization and integration. Very easy to get started with and use on commodity hardware.
Locutusque and Felladrin in particular are building some wonderful and quite useful small models.
Unsloth has focused on tinyllama, thus this focus on a great alternative, the TinyMistral series.
Model Details
Can be loaded through unsloth - rather than over-explaining, check out these resources:
You get the picture, small models make for better optimization, but this level of optimizing is needed for adoption, distillation, and reduced environmental impact.
Model Description
This isn't a useful model on its own - Uses unsloth's FastLanguageModel model loader, which handles a whole bunch of behind the scenes organization and complexity.
This is the model card of a 馃 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: All credit to Locutusque
- Funded by: Copious pocket lint
- Shared by: jtatman
- Model type: Peft/BitsnBytes 4-bit ready adapter
- Language(s) (NLP): None
- License: Apache 2.x
- Finetuned from model [optional]: Locutusque/TinyMistral-248M-v2
- Not Finetuned, a direct save of a 4bit (obviously, not 4bit on disk as this stream format not yet implemented in BnB) adapter load for memory requirements
Uses
Use with unsloth library only
Out-of-Scope Use
Will not load on inference on demand or through native transformers - yet.
- Downloads last month
- 5