Update README.md
Browse files
README.md
CHANGED
@@ -1,15 +1,58 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
-
|
5 |
-
|
6 |
-
|
7 |
-
-
|
8 |
-
|
9 |
-
- unsloth
|
10 |
-
|
11 |
-
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Uploaded model
|
15 |
|
|
|
1 |
+
# Taylor Swift Lyrics Llama Model (3.2, GGUF Format)
|
2 |
+
|
3 |
+
- **Base Model**: unsloth/llama-3.2-1b-bnb-4bit
|
4 |
+
- **Fine-tuned on**: Taylor Swift lyrics using QLoRA
|
5 |
+
- **Format**: GGUF (Not compatible with the `transformers` library; requires `llama-cpp-python`)
|
6 |
+
- **License**: Apache-2.0
|
7 |
+
- **Developed by**: Covvenheimer and Team
|
8 |
+
|
9 |
+
This model, fine-tuned on Taylor Swift lyrics, is tailored for generating text in the style of her songs, with themes of love, heartbreak, and romance. It was trained with a 2x speed improvement using [Unsloth](https://github.com/unslothai/unsloth) and Hugging Face’s TRL library, specifically optimized for GGUF format.
|
10 |
+
|
11 |
+
> **Important:** This model requires `llama-cpp-python` to run. It is incompatible with the `transformers` library due to its GGUF format.
|
12 |
+
|
13 |
+
## Installation and Setup
|
14 |
+
|
15 |
+
To load and run this model, install the `llama-cpp-python` library and download the model file from the Hugging Face Hub.
|
16 |
+
|
17 |
+
### Step-by-Step Code Example
|
18 |
+
|
19 |
+
1. **Install llama-cpp-python**
|
20 |
+
|
21 |
+
```python
|
22 |
+
!pip install llama-cpp-python
|
23 |
+
```
|
24 |
+
|
25 |
+
2. **Load the Model with llama-cpp**
|
26 |
+
|
27 |
+
```python
|
28 |
+
from huggingface_hub import hf_hub_download
|
29 |
+
from llama_cpp import Llama
|
30 |
+
|
31 |
+
# Define your model repository and file name
|
32 |
+
repo_id = "Covvenheimer/taylor_swift_model"
|
33 |
+
filename = "unsloth.Q4_K_M.gguf"
|
34 |
+
|
35 |
+
# Download the GGUF model file from Hugging Face
|
36 |
+
model_path = hf_hub_download(repo_id=repo_id, filename=filename)
|
37 |
+
|
38 |
+
# Load the model using llama-cpp-python
|
39 |
+
llm = Llama(model_path=model_path)
|
40 |
+
```
|
41 |
+
|
42 |
+
3. **Generate Text Using a Prompt**
|
43 |
+
|
44 |
+
```python
|
45 |
+
# Define a prompt for generating lyrics
|
46 |
+
prompt = """You are a songwriter composing a song in the style of Taylor Swift.
|
47 |
+
Write lyrics that reflect her themes and musical style, focusing on Love, Heartbreak, Romance."""
|
48 |
+
|
49 |
+
# Generate lyrics
|
50 |
+
output = llm(prompt, max_tokens=512, temperature=0.8)
|
51 |
+
print(output["choices"][0]["text"])
|
52 |
+
```
|
53 |
+
|
54 |
+
This setup will allow you to use the model efficiently and generate lyrics in the style of Taylor Swift.
|
55 |
+
|
56 |
|
57 |
# Uploaded model
|
58 |
|