File tree Expand file tree Collapse file tree 8 files changed +1338
-0
lines changed
__snapshots__/test_flash_gemma
server/text_generation_server/models Expand file tree Collapse file tree 8 files changed +1338
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ def serialize(
4040 exclude = None ,
4141 matcher = None ,
4242 ):
43+ if isinstance (data , Response ):
44+ data = data .dict ()
45+
4346 if isinstance (data , List ):
4447 data = [d .dict () for d in data ]
4548
Original file line number Diff line number Diff line change 1+ {
2+ "details" : {
3+ "best_of_sequences" : null ,
4+ "finish_reason" : " length" ,
5+ "generated_tokens" : 10 ,
6+ "prefill" : [
7+ {
8+ "id" : 2 ,
9+ "logprob" : null ,
10+ "text" : " <bos>"
11+ },
12+ {
13+ "id" : 2015 ,
14+ "logprob" : -10.0 ,
15+ "text" : " Test"
16+ },
17+ {
18+ "id" : 3853 ,
19+ "logprob" : -10.875 ,
20+ "text" : " request"
21+ }
22+ ],
23+ "seed" : null ,
24+ "tokens" : [
25+ {
26+ "id" : 1736 ,
27+ "logprob" : -2.09375 ,
28+ "special" : false ,
29+ "text" : " form"
30+ },
31+ {
32+ "id" : 109 ,
33+ "logprob" : -1.8671875 ,
34+ "special" : false ,
35+ "text" : " \n\n "
36+ },
37+ {
38+ "id" : 651 ,
39+ "logprob" : -2.4375 ,
40+ "special" : false ,
41+ "text" : " The"
42+ },
43+ {
44+ "id" : 2121 ,
45+ "logprob" : -1.8203125 ,
46+ "special" : false ,
47+ "text" : " test"
48+ },
49+ {
50+ "id" : 3853 ,
51+ "logprob" : -0.23242188 ,
52+ "special" : false ,
53+ "text" : " request"
54+ },
55+ {
56+ "id" : 1736 ,
57+ "logprob" : -0.08544922 ,
58+ "special" : false ,
59+ "text" : " form"
60+ },
61+ {
62+ "id" : 603 ,
63+ "logprob" : -0.9375 ,
64+ "special" : false ,
65+ "text" : " is"
66+ },
67+ {
68+ "id" : 1671 ,
69+ "logprob" : -1.671875 ,
70+ "special" : false ,
71+ "text" : " used"
72+ },
73+ {
74+ "id" : 577 ,
75+ "logprob" : -0.40429688 ,
76+ "special" : false ,
77+ "text" : " to"
78+ },
79+ {
80+ "id" : 3853 ,
81+ "logprob" : -1.1875 ,
82+ "special" : false ,
83+ "text" : " request"
84+ }
85+ ],
86+ "top_tokens" : null
87+ },
88+ "generated_text" : " form\n\n The test request form is used to request"
89+ }
Original file line number Diff line number Diff line change 1+ {
2+ "details" : {
3+ "best_of_sequences" : null ,
4+ "finish_reason" : " length" ,
5+ "generated_tokens" : 10 ,
6+ "prefill" : [
7+ {
8+ "id" : 2 ,
9+ "logprob" : null ,
10+ "text" : " <bos>"
11+ },
12+ {
13+ "id" : 2015 ,
14+ "logprob" : -10.0 ,
15+ "text" : " Test"
16+ },
17+ {
18+ "id" : 3853 ,
19+ "logprob" : -10.875 ,
20+ "text" : " request"
21+ }
22+ ],
23+ "seed" : 0 ,
24+ "tokens" : [
25+ {
26+ "id" : 7539 ,
27+ "logprob" : -0.73046875 ,
28+ "special" : false ,
29+ "text" : " forms"
30+ },
31+ {
32+ "id" : 708 ,
33+ "logprob" : 0.0 ,
34+ "special" : false ,
35+ "text" : " are"
36+ },
37+ {
38+ "id" : 671 ,
39+ "logprob" : -1.703125 ,
40+ "special" : false ,
41+ "text" : " an"
42+ },
43+ {
44+ "id" : 8727 ,
45+ "logprob" : 0.0 ,
46+ "special" : false ,
47+ "text" : " essential"
48+ },
49+ {
50+ "id" : 1702 ,
51+ "logprob" : 0.0 ,
52+ "special" : false ,
53+ "text" : " part"
54+ },
55+ {
56+ "id" : 576 ,
57+ "logprob" : 0.0 ,
58+ "special" : false ,
59+ "text" : " of"
60+ },
61+ {
62+ "id" : 573 ,
63+ "logprob" : 0.0 ,
64+ "special" : false ,
65+ "text" : " the"
66+ },
67+ {
68+ "id" : 11859 ,
69+ "logprob" : -1.6953125 ,
70+ "special" : false ,
71+ "text" : " lab"
72+ },
73+ {
74+ "id" : 2185 ,
75+ "logprob" : -1.3125 ,
76+ "special" : false ,
77+ "text" : " process"
78+ },
79+ {
80+ "id" : 578 ,
81+ "logprob" : -1.5 ,
82+ "special" : false ,
83+ "text" : " and"
84+ }
85+ ],
86+ "top_tokens" : null
87+ },
88+ "generated_text" : " Test request forms are an essential part of the lab process and"
89+ }
You can’t perform that action at this time.
0 commit comments