DSDUDEd commited on
Commit
06d4476
Β·
verified Β·
1 Parent(s): 4eb6f1f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -30
README.md CHANGED
@@ -1,38 +1,45 @@
1
- # ──────────────────────────────
2
- # Prepare "Dave" Hugging Face-ready repo
3
- # ──────────────────────────────
 
 
 
 
 
 
 
4
 
5
- !pip install -q torch transformers tokenizers
6
 
7
- import os
8
- import json
9
- import torch
10
- import torch.nn as nn
11
- from tokenizers import Tokenizer, models, pre_tokenizers, trainers, processors
12
-
13
- # -----------------------------
14
- # Settings
15
- # -----------------------------
16
- model_name = "dave"
17
- output_dir = f"./{model_name}"
18
- os.makedirs(output_dir, exist_ok=True)
19
- print(f"Using folder: {output_dir}")
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))