Add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: teknium/OpenHermes-2.5-Mistral-7B
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
- audiobook
|
| 7 |
+
- fine-tuned
|
| 8 |
+
- text-generation
|
| 9 |
+
- lora
|
| 10 |
+
- axolotl
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
widget:
|
| 15 |
+
- text: "Who is the main character in the story?"
|
| 16 |
+
- text: "Describe the setting of the book."
|
| 17 |
+
- text: "What are the main themes explored?"
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# the-silver-pigs-finetuned
|
| 21 |
+
|
| 22 |
+
This model was fine-tuned on audiobook content using the AudioBook Visualizer application.
|
| 23 |
+
|
| 24 |
+
## Model Details
|
| 25 |
+
|
| 26 |
+
- **Base Model**: teknium/OpenHermes-2.5-Mistral-7B
|
| 27 |
+
- **Fine-tuning Method**: QLoRA (4-bit quantization with LoRA adapters)
|
| 28 |
+
- **Training Framework**: Axolotl
|
| 29 |
+
- **Training Infrastructure**: RunPod Serverless
|
| 30 |
+
- **Upload Date**: 2025-08-11T03:57:51.529Z
|
| 31 |
+
|
| 32 |
+
## Training Configuration
|
| 33 |
+
|
| 34 |
+
- **LoRA Rank**: 32
|
| 35 |
+
- **LoRA Alpha**: 16
|
| 36 |
+
- **LoRA Dropout**: 0.05
|
| 37 |
+
- **Target Modules**: q_proj, v_proj, k_proj, o_proj
|
| 38 |
+
- **Learning Rate**: 2e-4
|
| 39 |
+
- **Batch Size**: 2
|
| 40 |
+
- **Gradient Accumulation**: 4
|
| 41 |
+
- **Training Duration**: ~3 minutes
|
| 42 |
+
|
| 43 |
+
## Usage with vLLM
|
| 44 |
+
|
| 45 |
+
Deploy on RunPod serverless with these environment variables:
|
| 46 |
+
|
| 47 |
+
```json
|
| 48 |
+
{
|
| 49 |
+
"MODEL_NAME": "the-silver-pigs-finetuned",
|
| 50 |
+
"TRUST_REMOTE_CODE": "true",
|
| 51 |
+
"MAX_MODEL_LEN": "2048",
|
| 52 |
+
"DTYPE": "float16",
|
| 53 |
+
"ENABLE_LORA": "true"
|
| 54 |
+
}
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Usage with Transformers
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 61 |
+
from peft import PeftModel
|
| 62 |
+
|
| 63 |
+
base_model = "teknium/OpenHermes-2.5-Mistral-7B"
|
| 64 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 65 |
+
base_model,
|
| 66 |
+
torch_dtype=torch.float16,
|
| 67 |
+
device_map="auto"
|
| 68 |
+
)
|
| 69 |
+
model = PeftModel.from_pretrained(model, "the-silver-pigs-finetuned")
|
| 70 |
+
|
| 71 |
+
tokenizer = AutoTokenizer.from_pretrained("the-silver-pigs-finetuned")
|
| 72 |
+
|
| 73 |
+
# Query the model
|
| 74 |
+
prompt = "Tell me about the main character."
|
| 75 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 76 |
+
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
|
| 77 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 78 |
+
print(response)
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## Training Data
|
| 82 |
+
|
| 83 |
+
This model was fine-tuned on audiobook transcript data, processed into ~490 question-answer pairs covering:
|
| 84 |
+
- Character descriptions and relationships
|
| 85 |
+
- Plot events and summaries
|
| 86 |
+
- Dialogue and memorable quotes
|
| 87 |
+
- Settings and world-building details
|
| 88 |
+
|
| 89 |
+
## Limitations
|
| 90 |
+
|
| 91 |
+
- Model knowledge is limited to the specific audiobook content
|
| 92 |
+
- May generate plausible but incorrect details
|
| 93 |
+
- Performance on general tasks may differ from base model
|
| 94 |
+
|
| 95 |
+
## Created With
|
| 96 |
+
|
| 97 |
+
[AudioBook Visualizer](https://github.com/yourusername/audiobook-visualizer) - An application for fine-tuning LLMs on audiobook content.
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
*Original model path: /workspace/outputs*
|