CallmeKaito commited on
Commit
0228866
·
verified ·
1 Parent(s): 16e421a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -11
README.md CHANGED
@@ -1,12 +1,14 @@
1
  ---
2
  base_model: unsloth/Llama-3.2-1B-Instruct
3
- library_name: transformers
4
  model_name: llama-3.2-1b-it-brainrot
5
  tags:
6
  - generated_from_trainer
7
  - trl
8
  - sft
9
  licence: license
 
 
10
  ---
11
 
12
  # Model Card for llama-3.2-1b-it-brainrot
@@ -17,18 +19,46 @@ It has been trained using [TRL](https://github.com/huggingface/trl).
17
  ## Quick start
18
 
19
  ```python
20
- from transformers import pipeline
 
21
 
22
- question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
- generator = pipeline("text-generation", model="CallmeKaito/llama-3.2-1b-it-brainrot", device="cuda")
24
- output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
- print(output["generated_text"])
26
- ```
27
 
28
- ## Training procedure
 
 
 
 
 
 
 
 
 
 
 
29
 
30
-
 
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  This model was trained with SFT.
34
 
@@ -42,8 +72,6 @@ This model was trained with SFT.
42
 
43
  ## Citations
44
 
45
-
46
-
47
  Cite TRL as:
48
 
49
  ```bibtex
 
1
  ---
2
  base_model: unsloth/Llama-3.2-1B-Instruct
3
+ library_name: peft
4
  model_name: llama-3.2-1b-it-brainrot
5
  tags:
6
  - generated_from_trainer
7
  - trl
8
  - sft
9
  licence: license
10
+ datasets:
11
+ - ShreeshaBhat1004/Brain-rot
12
  ---
13
 
14
  # Model Card for llama-3.2-1b-it-brainrot
 
19
  ## Quick start
20
 
21
  ```python
22
+ from peft import PeftModel
23
+ from transformers import AutoModelForCausalLM, AutoTokenizer
24
 
25
+ base_model = AutoModelForCausalLM.from_pretrained("unsloth/Llama-3.2-1B-Instruct")
26
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/Llama-3.2-1B-Instruct")
27
+ model = PeftModel.from_pretrained(base_model, "CallmeKaito/llama-3.2-1b-it-brainrot")
 
 
28
 
29
+ # Create chat template
30
+ messages = [
31
+ {"role": "system", "content": "ayoooo, you be Llama, big brain bot built by dem Meta wizards, no cap. Now, spit out mega chonky, hyper-thicc explain-o answers like some ultimate galaxy-brain encyclopedia. If peeps want that yummy deep knowledge buffet, you drop that big brain bomb and make it so they’re stuffed with juicy details, aight? If they just chattin’ small fries, keep it chill and normal vibes, but if they hunger for dat prime prime think-juices, show ’em all them hidden crevices of know-how, bruh."},
32
+ {"role": "user", "content": "homie tell me a lil more about the bronx situation and the wild stuff happening in nyc?"}
33
+ ]
34
+
35
+ # Generate prompt
36
+ prompt = tokenizer.apply_chat_template(
37
+ messages,
38
+ tokenize=False,
39
+ add_generation_prompt=True
40
+ )
41
 
42
+ # Tokenize inputs
43
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
44
 
45
+ # Generate response
46
+ outputs = model.generate(
47
+ **inputs,
48
+ max_new_tokens=150,
49
+ eos_token_id=tokenizer.eos_token_id,
50
+ do_sample=True,
51
+ temperature=0.7,
52
+ top_p=0.9,
53
+ )
54
+
55
+ # Decode and format output
56
+ full_response = tokenizer.decode(outputs[0], skip_special_tokens=True)
57
+ response = full_response.split("assistant\n")[-1].strip()
58
+ print(response)
59
+ ```
60
+
61
+ ## Training procedure
62
 
63
  This model was trained with SFT.
64
 
 
72
 
73
  ## Citations
74
 
 
 
75
  Cite TRL as:
76
 
77
  ```bibtex