Commit 423f65d
update eager runner to use same options for loading the model (pytorch#6257)
Summary:
Pull Request resolved: pytorch#6257
imported-using-ghimport
Test Plan:
Imported from OSS
Run the following command and make sure it generate the right result:
```
python -m examples.models.llama2.runner.eager \
-c /home/lunwenh/models/1B_Instruct/consolidated.00.pth \
-p /home/lunwenh/models/1B_Instruct/params.json \
-t /home/lunwenh/models/1B_Instruct/tokenizer.model \
--max_seq_length 128 \
-kv \
--prompt "<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a good assistant<|eot_id|><|start_header_id|>user<|end_header_id|>
What is the capital of France?<|eot_id|><|start_header_id|>assistant<|end_header_id|>"
```
```
Response:
The capital of France is Paris.<|eot_id|>
Tokens:
[791, 6864, 315, 9822, 374, 12366, 16134, 91, 68, 354, 851, 91, 29]
```
Reviewed By: mergennachin
Differential Revision: D64442224
Pulled By: helunwencser
fbshipit-source-id: bb8b11de6325ae76423b086491094a44442495531 parent 1d7c3ab commit 423f65d
1 file changed
+15
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
29 | 32 | | |
30 | | - | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 53 | + | |
82 | 54 | | |
83 | 55 | | |
84 | 56 | | |
| |||
0 commit comments