Update README.md
Browse files
README.md
CHANGED
|
@@ -1,38 +1,45 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
# -----------------------------
|
| 22 |
-
# README.md for Hugging Face
|
| 23 |
-
# -----------------------------
|
| 24 |
-
readme_content = """# Dave β Fully Custom AI Model
|
| 25 |
-
|
| 26 |
-
Dave is a fully custom-built transformer trained from scratch.
|
| 27 |
-
- Personality: fun, smart, coding-savvy, depressed, talks about drugs/alcohol, lost wife, has a kid, sometimes cringe, has close friends, swears frequently.
|
| 28 |
-
- 3000 prompts/responses were used for training.
|
| 29 |
-
- Architecture: custom Transformer implementation.
|
| 30 |
-
- Trained from scratch.
|
| 31 |
-
|
| 32 |
-
## How to use
|
| 33 |
|
| 34 |
```python
|
| 35 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 36 |
|
|
|
|
| 37 |
tokenizer = AutoTokenizer.from_pretrained("DSDUDEd/Dave")
|
| 38 |
model = AutoModelForCausalLM.from_pretrained("DSDUDEd/Dave")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- causal-lm
|
| 6 |
+
- custom
|
| 7 |
+
- transformer
|
| 8 |
+
- from-scratch
|
| 9 |
+
- conversational-ai
|
| 10 |
+
---
|
| 11 |
|
| 12 |
+
# Dave β Fully Custom AI Model
|
| 13 |
|
| 14 |
+
Dave is a fully custom AI model trained completely from scratch.
|
| 15 |
+
It has a fun, smart, coding-savvy, slightly depressed personality, talks about drugs and alcohol, is sometimes cringe, and has close friends.
|
| 16 |
+
This model contains **3000 unique prompt/response pairs** created for training Daveβs personality.
|
| 17 |
+
|
| 18 |
+
## Model Files
|
| 19 |
+
|
| 20 |
+
The repository contains:
|
| 21 |
+
|
| 22 |
+
- `pytorch_model.bin` β the trained model weights
|
| 23 |
+
- `config.json` β model configuration
|
| 24 |
+
- `tokenizer.json` β the tokenizer
|
| 25 |
+
- `generation_config.json` β generation settings for sampling outputs
|
| 26 |
+
|
| 27 |
+
## How to Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
```python
|
| 30 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 31 |
+
import torch
|
| 32 |
|
| 33 |
+
# Load the tokenizer and model
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained("DSDUDEd/Dave")
|
| 35 |
model = AutoModelForCausalLM.from_pretrained("DSDUDEd/Dave")
|
| 36 |
+
|
| 37 |
+
# Example prompt
|
| 38 |
+
prompt = "Hey Dave, give me coding advice."
|
| 39 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 40 |
+
|
| 41 |
+
# Generate output
|
| 42 |
+
outputs = model.generate(**inputs, max_new_tokens=50, do_sample=True, temperature=0.7, top_p=0.9)
|
| 43 |
+
|
| 44 |
+
# Decode and print
|
| 45 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|