Instructions to use mlx-community/Mellum-4b-sft-python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Mellum-4b-sft-python 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/Mellum-4b-sft-python") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use mlx-community/Mellum-4b-sft-python 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/Mellum-4b-sft-python" --prompt "Once upon a time"
File size: 1,127 Bytes
7a9fd4b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | {
"additional_special_tokens": [
"<gh_stars>",
"</system>",
"<issue_start>",
"</think>",
"<commit_after>",
"<assistant>",
"<jupyter_text>",
"<fim_middle>",
"</assistant>",
"<jupyter_code>",
"<user>",
"<filename>",
"<think>",
"<fim_suffix>",
"<fim_prefix>",
"<commit_msg>",
"<fim_pad>",
"<system>",
"<issue_comment>",
"<reponame>",
"<jupyter_start>",
"<issue_closed>",
"<commit_before>",
"<empty_output>",
"<jupyter_output>",
"</user>"
],
"bos_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
}
}
|