How to use from
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 Covvenheimer/taylor_swift_model:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf Covvenheimer/taylor_swift_model:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf Covvenheimer/taylor_swift_model:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf Covvenheimer/taylor_swift_model: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 Covvenheimer/taylor_swift_model:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf Covvenheimer/taylor_swift_model: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 Covvenheimer/taylor_swift_model:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf Covvenheimer/taylor_swift_model:Q4_K_M
Use Docker
docker model run hf.co/Covvenheimer/taylor_swift_model:Q4_K_M
Quick Links

Taylor Swift Lyrics Llama Model (3.2, GGUF Format)

  • Base Model: unsloth/llama-3.2-1b-bnb-4bit
  • Fine-tuned on: Taylor Swift lyrics using QLoRA
  • Format: GGUF (Not compatible with the transformers library; requires llama-cpp-python)
  • License: Apache-2.0
  • Developed by: Covvenheimer and Team

This model, fine-tuned on Taylor Swift lyrics, is tailored for generating text in the style of her songs. It was trained with a 2x speed improvement using Unsloth and Hugging Face’s TRL library, specifically optimized for GGUF format.

Important: This model requires llama-cpp-python to run. It is incompatible with the transformers library due to its GGUF format.

Installation and Setup

To load and run this model, install the llama-cpp-python library and download the model file from the Hugging Face Hub.

Step-by-Step Code Example

  1. Install llama-cpp-python

    !pip install llama-cpp-python
    
  2. Load the Model with llama-cpp

    from huggingface_hub import hf_hub_download
    from llama_cpp import Llama
    
    # Define your model repository and file name
    repo_id = "Covvenheimer/taylor_swift_model"
    filename = "unsloth.Q4_K_M.gguf"
    
    # Download the GGUF model file from Hugging Face
    model_path = hf_hub_download(repo_id=repo_id, filename=filename)
    
    # Load the model using llama-cpp-python
    llm = Llama(model_path=model_path)
    
  3. Generate Text Using a Prompt

    # Define a prompt for generating lyrics
    prompt = """You are a songwriter composing a song in the style of Taylor Swift.
    Write lyrics that reflect her themes and musical style, focusing on Love, Heartbreak, Romance."""
    
    # Generate lyrics
    output = llm(prompt, max_tokens=512, temperature=0.8)
    print(output["choices"][0]["text"])
    

    Tip: To customize the themes, change the last line of the prompt. For example, you can modify the focus to other themes like "Friendship, Growth, Resilience." Replace "Love, Heartbreak, Romance" with your chosen themes.

This setup will allow you to use the model efficiently and generate lyrics in the style of Taylor Swift.


Uploaded model

  • Developed by: Covvenheimer
  • License: apache-2.0
  • Finetuned from model : unsloth/llama-3.2-1b-bnb-4bit

This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.

Downloads last month
33
GGUF
Model size
1B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support