rudrashah commited on
Commit
200311b
1 Parent(s): 1a23489

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -1
README.md CHANGED
@@ -2,4 +2,28 @@
2
  base_model:
3
  - google/gemma-2-2b-it
4
  pipeline_tag: text-generation
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  base_model:
3
  - google/gemma-2-2b-it
4
  pipeline_tag: text-generation
5
+ metrics:
6
+ - accuracy
7
+ ---
8
+
9
+ ## Description
10
+ RLM-spell-checker is a fined-tuned version of gemma-2b-V3. This model is fined-tuned using LoRA.
11
+
12
+ ### Author: [Rudra Shah](https://www.linkedin.com/in/rudra-shah-b044781b4/)
13
+
14
+ ## Running Model
15
+ ``` python
16
+ # Load model directly
17
+ from transformers import AutoTokenizer, AutoModelForCausalLM
18
+
19
+ tokenizer = AutoTokenizer.from_pretrained("rudrashah/RLM-spell-checker")
20
+ model = AutoModelForCausalLM.from_pretrained("rudrashah/RLM-spell-checker")
21
+
22
+ sent = "Whaat iss the mision?"
23
+ template = "Sentence:\n{org}\n\nCorrect_Grammar:\n{new}"
24
+ input_text = template.format(org=sent, new="")
25
+
26
+ input_ids = tokenizer(input_text, return_tensors="pt")
27
+ outputs = model.generate(**input_ids, max_new_tokens=128)
28
+ print(tokenizer.decode(outputs[0]))
29
+ ```