rishiraj commited on
Commit
9e8efd2
1 Parent(s): bfa4d79

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -6
README.md CHANGED
@@ -11,12 +11,27 @@ tags:
11
  - trl
12
  ---
13
 
14
- # Uploaded model
 
15
 
16
- - **Developed by:** rishiraj
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/gemma-2-9b-bnb-4bit
19
 
20
- This gemma2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
 
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  - trl
12
  ---
13
 
14
+ ```
15
+ prompt = """You are tasked with writing a poem in the style of the poet mentioned below. The poem should fit the specified category and adhere to the poet's distinctive tone, language, and themes.
16
 
17
+ ### Poet:
18
+ {}
 
19
 
20
+ ### Category:
21
+ {}
22
 
23
+ ### Poem:
24
+ {}"""
25
+
26
+ inputs = tokenizer(
27
+ [
28
+ prompt.format(
29
+ "সুনীল গঙ্গোপাধ্যায়",
30
+ "প্রেমমূলক",
31
+ "",
32
+ )
33
+ ], return_tensors = "pt").to("cuda")
34
+
35
+ outputs = model.generate(**inputs, max_new_tokens = 256, use_cache = True)
36
+ tokenizer.batch_decode(outputs)
37
+ ```