Realluke commited on
Commit
c286aa9
1 Parent(s): 949c30f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -0
README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ ---
5
+
6
+ # Phi-2 Senator Tweets
7
+
8
+ [Phi-2](https://huggingface.co/microsoft/phi-2) finetuned on [Senator Tweets](https://huggingface.co/datasets/m-newhauser/senator-tweets).
9
+
10
+ The starting token is [start] and the ending token is [end]
11
+
12
+ Example:
13
+ ```python
14
+ from transformers import AutoTokenizer, AutoModelForCausalLM
15
+
16
+ model = AutoModelForCausalLM.from_pretrained("Realluke/phi-2-senator-tweets", low_cpu_mem_usage=True, torch_dtype="auto", trust_remote_code=True)
17
+ tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", cache_dir="./tokenizer", use_fast=True)
18
+
19
+ inputs = tokenizer("[start]", return_tensors="pt", return_attention_mask=False)
20
+ outputs = model.generate(**inputs, max_length=200)
21
+ text = tokenizer.batch_decode(outputs)[0]
22
+
23
+ print(text)
24
+ ```
25
+
26
+ ## Model Details
27
+
28
+ ### Model Description
29
+
30
+ - **Steps:** 750
31
+ - **Finetuning Examples:** 1000
32
+ - **GPU:** NVIDIA Tesla T4
33
+ - **GPU Hours:** 2