Instructions to use busratuter/metal-rock with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use busratuter/metal-rock with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="busratuter/metal-rock")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("busratuter/metal-rock", dtype="auto") - llama-cpp-python
How to use busratuter/metal-rock with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="busratuter/metal-rock", filename="unsloth.Q4_K_M.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 busratuter/metal-rock with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf busratuter/metal-rock:Q4_K_M # Run inference directly in the terminal: llama-cli -hf busratuter/metal-rock:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf busratuter/metal-rock:Q4_K_M # Run inference directly in the terminal: llama-cli -hf busratuter/metal-rock: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 busratuter/metal-rock:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf busratuter/metal-rock: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 busratuter/metal-rock:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf busratuter/metal-rock:Q4_K_M
Use Docker
docker model run hf.co/busratuter/metal-rock:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use busratuter/metal-rock with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "busratuter/metal-rock" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "busratuter/metal-rock", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/busratuter/metal-rock:Q4_K_M
- SGLang
How to use busratuter/metal-rock 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 "busratuter/metal-rock" \ --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": "busratuter/metal-rock", "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 "busratuter/metal-rock" \ --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": "busratuter/metal-rock", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use busratuter/metal-rock with Ollama:
ollama run hf.co/busratuter/metal-rock:Q4_K_M
- Unsloth Studio new
How to use busratuter/metal-rock 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 busratuter/metal-rock 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 busratuter/metal-rock to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for busratuter/metal-rock to start chatting
- Docker Model Runner
How to use busratuter/metal-rock with Docker Model Runner:
docker model run hf.co/busratuter/metal-rock:Q4_K_M
- Lemonade
How to use busratuter/metal-rock with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull busratuter/metal-rock:Q4_K_M
Run and chat with the model
lemonade run user.metal-rock-Q4_K_M
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)busratuter/metal-rock Model
English Description
This model is a fine-tuned version of Meta's Llama 3.1 8B model, trained on a custom Turkish dataset focused on rock and metal music. The model's purpose is to answer questions about these music genres, explain the similarities between bands, and provide general knowledge.
The training was accelerated and optimized using the Unsloth library.
- Developer: busratuter
- License: apache-2.0
- Finetuned from model: unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit
Model Description
This model is designed as an assistant for users who want to master the world of rock and metal music, learn about the musical styles of various bands, and discover similarities between them. It contains information about bands like AC/DC, Metallica, Queen, and Green Day, as well as many different subgenres.
How to Use (with GGUF)
The GGUF version of this model can be run efficiently on your local machine using llama.cpp-based applications (like Jan, LM Studio, Open WebUI, etc.).
Below is an up-to-date and correct example of how to use it with the llama-cpp-python library:
# Install the required libraries
!pip install llama-cpp-python huggingface_hub -q
from huggingface_hub import hf_hub_download
from llama_cpp import Llama
# Download the model from the Hugging Face Hub
model_name = "busratuter/metal-rock"
model_file = "unsloth.Q4_K_M.gguf" # The name of the GGUF file you want to use
model_path = hf_hub_download(repo_id=model_name, filename=model_file)
# Load the model, specifying the Llama 3 chat format
llm = Llama(
model_path=model_path,
n_ctx=4096, # Maximum context window to use
n_threads=8, # Number of CPU cores to use
n_gpu_layers=-1, # Number of layers to offload to GPU (-1 for all)
chat_format="llama-3" # This line automatically sets the prompt format
)
# Create a message list suitable for the Llama 3.1 Chat format
messages = [
{
"role": "system",
"content": "You are an expert assistant on rock and metal music. Answer questions with your knowledge in this field, providing clear and informative responses.",
},
{
"role": "user",
"content": "What are the main musical differences between Iron Maiden and Metallica?",
},
]
# Run the model in chat mode
output = llm.create_chat_completion(
messages = messages,
max_tokens = 512, # Maximum response length
)
# Print the model's response
print(output["choices"][0]["message"]["content"])
- Downloads last month
- 3
4-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="busratuter/metal-rock", filename="unsloth.Q4_K_M.gguf", )