Bton commited on
Commit
3a52819
·
verified ·
1 Parent(s): 85de50c

Update README.md

Browse files

make it look nice

Files changed (1) hide show
  1. README.md +55 -34
README.md CHANGED
@@ -1,54 +1,75 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
4
 
5
- # ⚠️ Warning: Occasionally starts speaking German for no reason
6
-
7
- This model was trained on Amazon reviews, not Berlin travel blogs. If it suddenly says *"Wundervoll, aber zu teuer!"*, just roll with it. We're not sure why it happens, but it *really* likes European flashlights.
8
 
9
  ---
10
 
11
- # Fine-Tuned LLaMA 2 (7B) with PEFT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
- ## 🧠 Model Summary
 
 
14
 
15
- This model is a parameter-efficient fine-tuned version of [NousResearch/Llama-2-7b-hf](https://huggingface.co/NousResearch/Llama-2-7b-hf), utilizing the PEFT library. It is designed to replicate the tone, style, and expression of a specific individual's writing style—specifically, the author's father—based on his Amazon product reviews over the years.
16
 
17
- ## ✅ Intended Use
 
18
 
19
- ### Direct Use
20
- - Text generation in the voice of a real Amazon reviewer (the author's dad)
21
- - Use in writing prompts, product review emulation, or humorous content generation
22
 
23
- ### Out-of-Scope Use
24
- - Not for high-stakes domains (legal, medical, financial)
25
- - Not intended for impersonation, misinformation, or deceptive use
26
 
27
- ## ⚠️ Risks and Limitations
28
 
29
- - May reflect biases or strong opinions from the training data (a single individual)
30
- - Not guaranteed to be factually correct or neutral
31
- - Can randomly switch to German mid-sentence—cause unknown
32
- - Reflects a personal and informal tone; not suited for formal applications
33
 
34
- ## 🏋️ Training Details
35
 
36
- - **PEFT Method:** LoRA
37
- - **Precision:** bf16
38
- - **Training Data:** Scraped and cleaned Amazon reviews written by the author's father over many years, curated to replicate tone and expression
39
- - **Hardware:** [Insert your training hardware here, e.g., 1x A100, M3 MacBook, etc.]
40
 
41
- ## 💻 Example Usage
42
 
43
- ```python
44
- from peft import PeftModel, PeftConfig
45
- from transformers import AutoModelForCausalLM, AutoTokenizer
46
 
47
- config = PeftConfig.from_pretrained("your-model-path")
48
- base_model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path)
49
- model = PeftModel.from_pretrained(base_model, "your-model-path")
50
- tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
51
 
52
- inputs = tokenizer("Write a review of a flashlight", return_tensors="pt")
53
- outputs = model.generate(**inputs)
54
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
 
1
  ---
2
  license: mit
3
+ library_name: peft
4
+ base_model: NousResearch/Llama-2-7b-hf
5
+ datasets:
6
+ - Bton/vine-reviews
7
+ tags:
8
+ - peft
9
+ - lora
10
+ - text-generation
11
+ - personalized
12
+ - fine-tuned
13
+ - amazon-reviews
14
+ - jsonl
15
+ pipeline_tag: text-generation
16
  ---
17
 
18
+ # ⚠️ Warning: Occasionally starts speaking German for no reason. dunno.
19
+ Trained on a Google Colab T4 GPU — not the prettiest, but it gets the job done.
 
20
 
21
  ---
22
 
23
+ # 🧠 Fine-Tuned LLaMA 2 (7B) with PEFT
24
+
25
+ ## Model Summary
26
+
27
+ This model is a parameter-efficient fine-tuned version of [NousResearch/Llama-2-7b-hf](https://huggingface.co/NousResearch/Llama-2-7b-hf), built using the `peft` library with LoRA.
28
+ It was trained to replicate the tone, language, and reviewing habits of my dad, a long-time Amazon Vine reviewer.
29
+
30
+ Training was done on a custom dataset derived from years of Amazon reviews, scraped and structured into instruction-tuned format for use in conversational modeling.
31
+ Example format:
32
+
33
+ ```json
34
+ {"text": "<s>[INST] Does not include rechargeable batteries [/INST] I thought that these included rechargeable batteries, but after re-reading the description... </s>"}
35
+ The data was split into:
36
+
37
+ train.jsonl
38
+
39
+ valid.jsonl
40
+
41
+ test.jsonl
42
+
43
+ Each entry follows the <s>[INST] instruction [/INST] response </s> structure to support compatibility with LLaMA-style dialogue tuning.
44
+
45
 
46
+ Intended Use
47
+ Direct Use
48
+ Regenerate product reviews in the style of a prolific Amazon Vine reviewer
49
 
50
+ Emulate personal tone in ecommerce content, chatbots, or stylized summaries
51
 
52
+ Out-of-Scope Use
53
+ Not for high-stakes domains (legal, medical, financial)
54
 
55
+ Not intended for impersonation, misinformation, or deceptive representations
 
 
56
 
57
+ ⚠️ Risks and Limitations
58
+ May reflect strong personal opinions especially about polyester and glove insulation
 
59
 
60
+ Not guaranteed to be factually accurate or hallucination-free
61
 
62
+ Prone to occasional repetition
 
 
 
63
 
64
+ Can randomly switch to German mid-sentence (don’t ask, we don’t know either)
65
 
66
+ 🏋️ Training Details
67
+ PEFT Method: LoRA (Low-Rank Adaptation)
 
 
68
 
69
+ Precision: bf16
70
 
71
+ Training Data: Bton/vine-reviews — scraped, cleaned, and formatted Amazon Vine reviews written by better reviewer than myself.
 
 
72
 
73
+ Data Format: JSONL with instruction-style <s>[INST] ... [/INST] ... </s> prompts
 
 
 
74
 
75
+ Hardware: Google Colab 1 x T4 GPU