philippelaban commited on
Commit
60ebd02
1 Parent(s): 219e90d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -2
README.md CHANGED
@@ -1,3 +1,5 @@
 
 
1
  The model can be loaded in the following way:
2
  ```
3
  from transformers import AutoTokenizer, AutoModelForCausalLM
@@ -7,7 +9,18 @@ tokenizer = AutoTokenizer.from_pretrained("philippelaban/keep_it_simple")
7
  kis_model = AutoModelForCausalLM.from_pretrained("philippelaban/keep_it_simple")
8
  ```
9
 
10
- And then used by first inputting a paragraph for simplification, followed by a `bos_token` to indicate to the model to start simplifying:
 
 
 
 
 
 
 
 
 
 
 
11
  ```
12
  paragraph = """A small capsule containing asteroid soil samples that was dropped from 136,700 miles in space by Japan's Hayabusa2 spacecraft landed as planned in the Australian Outback on December 6. The extremely high precision required to carry out the mission thrilled many in Japan, who said they took pride in its success."""
13
 
@@ -25,6 +38,8 @@ for o in output:
25
  print(o)
26
  ```
27
 
 
 
28
  When run, an output similar to the following should be obtained:
29
 
30
  A small capsule containing samples of asteroid soil that was dropped from 136,700 miles, Japan's Hayabusa2 space probe, landed as planned on December 6. The mission was extremely precise, said many in Japan, and they took pride in its success.
@@ -33,4 +48,9 @@ A small capsule containing samples of asteroid soil that was dropped from 136,70
33
 
34
  A small capsule containing soil samples that was dropped from 136,700 miles, Japan's Hayabusa2 space probe, landed as planned on December 6. The mission was designed to test the performance of the country's space fleet, which many said took pride in its success.
35
 
36
- A small capsule containing soil samples that was dropped from 136,700 miles in space by Japan's Hayabusa2 probe was followed by a landing on the Outback. The precise timing of the mission thrilled many in Japan, who said they took pride in its success.
 
 
 
 
 
 
1
+ # Model Loading
2
+
3
  The model can be loaded in the following way:
4
  ```
5
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
9
  kis_model = AutoModelForCausalLM.from_pretrained("philippelaban/keep_it_simple")
10
  ```
11
 
12
+ # Example use
13
+
14
+ And then used by first inputting a paragraph for simplification, followed by a `bos_token` to indicate to the model to start simplifying.
15
+ Imagine we want to simplify the following paragraph:
16
+ ```
17
+ A small capsule containing asteroid soil samples that was dropped from 136,700 miles in space
18
+ by Japan's Hayabusa2 spacecraft landed as planned in the Australian Outback on December 6.
19
+ The extremely high precision required to carry out the mission thrilled many in Japan,
20
+ who said they took pride in its success.
21
+ ```
22
+
23
+ The following code can be run:
24
  ```
25
  paragraph = """A small capsule containing asteroid soil samples that was dropped from 136,700 miles in space by Japan's Hayabusa2 spacecraft landed as planned in the Australian Outback on December 6. The extremely high precision required to carry out the mission thrilled many in Japan, who said they took pride in its success."""
26
 
 
38
  print(o)
39
  ```
40
 
41
+ # Example output
42
+
43
  When run, an output similar to the following should be obtained:
44
 
45
  A small capsule containing samples of asteroid soil that was dropped from 136,700 miles, Japan's Hayabusa2 space probe, landed as planned on December 6. The mission was extremely precise, said many in Japan, and they took pride in its success.
 
48
 
49
  A small capsule containing soil samples that was dropped from 136,700 miles, Japan's Hayabusa2 space probe, landed as planned on December 6. The mission was designed to test the performance of the country's space fleet, which many said took pride in its success.
50
 
51
+ A small capsule containing soil samples that was dropped from 136,700 miles in space by Japan's Hayabusa2 probe was followed by a landing on the Outback. The precise timing of the mission thrilled many in Japan, who said they took pride in its success.
52
+
53
+ # Github repo
54
+
55
+ You can access more information, access to the scoring function, the training script, or an example training log on the Github repo:
56
+ https://github.com/tingofurro/keep_it_simple