Downloads · 30 days
49
6% of all-time downloads
Covvenheimer/taylor_swift_model
taylor_swift_model is a text generation model from Covvenheimer. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
- 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 b…
Downloads · 30 days
49
6% of all-time downloads
All-time downloads
823
Public
Repo size
808 MB
Likes
0
Public
Click a slice to open those files.
.gguf808 MB · 100%
From the Hugging Face model README
transformers library; requires llama-cpp-python)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-pythonto run. It is incompatible with thetransformerslibrary due to its GGUF format.
To load and run this model, install the llama-cpp-python library and download the model file from the Hugging Face Hub.
Install llama-cpp-python
!pip install llama-cpp-python
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)
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.
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.