Instructions to use mlx-community/TinyMistral-248M-4bits with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/TinyMistral-248M-4bits with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/TinyMistral-248M-4bits") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use mlx-community/TinyMistral-248M-4bits with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "mlx-community/TinyMistral-248M-4bits" --prompt "Once upon a time"
- Atomic Chat
Download tokenizer_config.json from mlx-community/TinyMistral-248M-4bits: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/mlx-community/TinyMistral-248M-4bits/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://mlx-community/TinyMistral-248M-4bits/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/mlx-community/TinyMistral-248M-4bits/resolve/main/tokenizer_config.json
1.99 kB
| { | |
| "add_bos_token": true, | |
| "add_eos_token": false, | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32000": { | |
| "content": "<|bos|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32001": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32002": { | |
| "content": "[PAD]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32003": { | |
| "content": "<|ASSISTANT|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32004": { | |
| "content": "<|USER|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<|ASSISTANT|>", | |
| "<|USER|>" | |
| ], | |
| "bos_token": "<|bos|>", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|endoftext|>", | |
| "max_length": 1536, | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "[PAD]", | |
| "sp_model_kwargs": {}, | |
| "spaces_between_special_tokens": false, | |
| "stride": 0, | |
| "tokenizer_class": "LlamaTokenizer", | |
| "truncation_side": "right", | |
| "truncation_strategy": "longest_first", | |
| "unk_token": "<unk>", | |
| "use_default_system_prompt": true | |
| } | |