Instructions to use Etherll/Mellum-4b-sft-rust-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Etherll/Mellum-4b-sft-rust-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Etherll/Mellum-4b-sft-rust-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Etherll/Mellum-4b-sft-rust-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Etherll/Mellum-4b-sft-rust-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
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 Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
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 Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Etherll/Mellum-4b-sft-rust-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Etherll/Mellum-4b-sft-rust-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Etherll/Mellum-4b-sft-rust-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
- SGLang
How to use Etherll/Mellum-4b-sft-rust-GGUF 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 "Etherll/Mellum-4b-sft-rust-GGUF" \ --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": "Etherll/Mellum-4b-sft-rust-GGUF", "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 "Etherll/Mellum-4b-sft-rust-GGUF" \ --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": "Etherll/Mellum-4b-sft-rust-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Etherll/Mellum-4b-sft-rust-GGUF with Ollama:
ollama run hf.co/Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
- Unsloth Studio
How to use Etherll/Mellum-4b-sft-rust-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 Etherll/Mellum-4b-sft-rust-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 Etherll/Mellum-4b-sft-rust-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Etherll/Mellum-4b-sft-rust-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Etherll/Mellum-4b-sft-rust-GGUF with Docker Model Runner:
docker model run hf.co/Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
- Lemonade
How to use Etherll/Mellum-4b-sft-rust-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Etherll/Mellum-4b-sft-rust-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Mellum-4b-sft-rust-GGUF-Q4_K_M
List all available models
lemonade list
Etherll/Mellum-4b-sft-rust
Etherll/Mellum-4b-sft-rust is a large language model (LLM) fine-tuned specifically for Rust code Fill-in-the-Middle (FIM) tasks. It is built upon JetBrains/Mellum-4b-base model.
This model has been fine-tuned on the Etherll/CodeFIM-Rust-Mellum dataset, which comprises approximately 57,000 Rust-specific FIM examples, to enhance its proficiency in completing Rust code snippets accurately and contextually.
A GGUF version for CPU inference is also available: Etherll/Mellum-4b-sft-rust-GGUF.
Model Description
This model leverages the LLaMA-style architecture of Mellum-4b-base (4 billion parameters) and its extensive pre-training on over 4 trillion tokens. The fine-tuning process focused on adapting the model to the nuances of Rust syntax and common coding patterns for FIM tasks.
Key Features:
- Specialized for Rust: Optimized for Fill-in-the-Middle tasks in Rust.
- Based on Mellum-4b-base: Benefits from JetBrains' robust base model.
- Efficient: Suitable for both cloud and local deployment.
- IDE Integration Ready: Designed for use in developer tooling, and works particularly well with Continue.dev for an enhanced coding assistant experience.
Fine-tuning Data
- Dataset:
Etherll/CodeFIM-Rust-Mellum - Size: ~57,000 rows
- Focus: Rust code Fill-in-the-Middle
FIM Format
This model is trained to recognize a specific format for Fill-in-the-Middle tasks. When providing input for FIM, please use the following structure:
<filename>{{{filename}}}
<fim_suffix>{{{suffix_code}}}<fim_prefix>{{{prefix_code}}}<fim_middle>
How to Use
With Continue.dev
For the best integrated development experience, it's highly recommended to use this model with Continue.dev.
Refer to the Continue.dev documentation for instructions on how to add custom LLMs.
GGUF Version
A GGUF version is available at Etherll/Mellum-4b-sft-rust-GGUF. This format is suitable for local inference on CPU (and GPU with appropriate llama.cpp/Ollama builds) using tools like:
Support & Community
If you need any help, have questions, or just want to chat, feel free to message me on Discord: etherl
- Downloads last month
- 142
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for Etherll/Mellum-4b-sft-rust-GGUF
Base model
JetBrains/Mellum-4b-base