Instructions to use JetBrains/Mellum-4b-sft-python-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JetBrains/Mellum-4b-sft-python-gguf with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JetBrains/Mellum-4b-sft-python-gguf", dtype="auto") - llama-cpp-python
How to use JetBrains/Mellum-4b-sft-python-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="JetBrains/Mellum-4b-sft-python-gguf", filename="mellum-4b-sft-python.Q8_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use JetBrains/Mellum-4b-sft-python-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf JetBrains/Mellum-4b-sft-python-gguf:Q8_0
Use Docker
docker model run hf.co/JetBrains/Mellum-4b-sft-python-gguf:Q8_0
- LM Studio
- Jan
- Ollama
How to use JetBrains/Mellum-4b-sft-python-gguf with Ollama:
ollama run hf.co/JetBrains/Mellum-4b-sft-python-gguf:Q8_0
- Unsloth Studio new
How to use JetBrains/Mellum-4b-sft-python-gguf 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 JetBrains/Mellum-4b-sft-python-gguf 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 JetBrains/Mellum-4b-sft-python-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for JetBrains/Mellum-4b-sft-python-gguf to start chatting
- Docker Model Runner
How to use JetBrains/Mellum-4b-sft-python-gguf with Docker Model Runner:
docker model run hf.co/JetBrains/Mellum-4b-sft-python-gguf:Q8_0
- Lemonade
How to use JetBrains/Mellum-4b-sft-python-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull JetBrains/Mellum-4b-sft-python-gguf:Q8_0
Run and chat with the model
lemonade run user.Mellum-4b-sft-python-gguf-Q8_0
List all available models
lemonade list
Q4 quants
Hi, guys, can you, please also upload a Q4 quants? It seems model cannot be converted to gguf using latest llama.cpp (I'm getting NotImplementedError: BPE pre-tokenizer was not recognized - update get_vocab_base_pre() error while running ./convert_hf_to_gguf.py --outfile ../mellum-non-quant.gguf --verbose ../Mellum-4b-sft-python/
Use llama-quantize
llama-quantize --allow-requantize Mellum-4B-SFT-Python.Q8_0.gguf Mellum-4B-SFT-Python.Q4_0.gguf Q4_0
Or you can use convert_hf_to_gguf_update.py, as a warning says. To do this, go to convert_hf_to_gguf_update.py and replace the dict models with
models = [
{"name": "gpt-2", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/JetBrains/Mellum-4b-sft-python", },
]
Don't forget to remove a folder models/tokenizers/gpt-2 from the llama.cpp repo if exists.
Run ./convert_hf_to_gguf_update.py <YOUR_HF_TOKEN>, it should update the convert_hf_to_gguf.py.
Then run ./convert_hf_to_gguf.py --outfile ../mellum-non-quant.gguf --verbose ../Mellum-4b-sft-python/, should work.