Spaces:
Build error
Build error
Changed device_map to force GPU, see #6, https://github.com/tloen/alpaca-lora/issues/21
Browse files- example-datasets/example-data-limericks.txt +478 -0
- main.py +4 -4
example-datasets/example-data-limericks.txt
ADDED
@@ -0,0 +1,478 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
There once was a cat with a hat
|
2 |
+
Who liked to chase mice and get fat
|
3 |
+
But one day he found
|
4 |
+
That his hat was unsound
|
5 |
+
And ended up looking quite flat
|
6 |
+
|
7 |
+
|
8 |
+
There once was a man from Peru
|
9 |
+
Whose shoes were a bright shade of blue
|
10 |
+
He walked down the street
|
11 |
+
With a confident beat
|
12 |
+
And everyone said "Who knew?"
|
13 |
+
|
14 |
+
|
15 |
+
There once was a girl with a kite
|
16 |
+
She flew it with all of her might
|
17 |
+
But the wind was too strong
|
18 |
+
And before very long
|
19 |
+
The kite was nowhere in sight
|
20 |
+
|
21 |
+
|
22 |
+
There once was a chef named Pierre
|
23 |
+
Whose souffles were the talk of the year
|
24 |
+
But one day he slipped
|
25 |
+
And the souffle was flipped
|
26 |
+
And it landed right in his ear
|
27 |
+
|
28 |
+
|
29 |
+
There once was a boy with a ball
|
30 |
+
Who played in the park with his doll
|
31 |
+
But the ball rolled away
|
32 |
+
And he didn't know what to say
|
33 |
+
So he went home feeling quite small
|
34 |
+
|
35 |
+
|
36 |
+
There once was a bird in a tree
|
37 |
+
Who sang a sweet melody
|
38 |
+
But then came a storm
|
39 |
+
And the bird lost its form
|
40 |
+
And its tune was no longer free
|
41 |
+
|
42 |
+
|
43 |
+
There once was a man with a beard
|
44 |
+
That he thought was quite weird
|
45 |
+
But then he realized
|
46 |
+
That it was quite prized
|
47 |
+
And his confidence was then steered
|
48 |
+
|
49 |
+
|
50 |
+
There once was a woman named Sue
|
51 |
+
Who liked to wear nothing but blue
|
52 |
+
But one day she found
|
53 |
+
That her clothes were unsound
|
54 |
+
And she had to start anew
|
55 |
+
|
56 |
+
|
57 |
+
There once was a dog with a bone
|
58 |
+
Who wouldn't share it with anyone
|
59 |
+
But then came a friend
|
60 |
+
And he learned to bend
|
61 |
+
And they both had fun in the sun
|
62 |
+
|
63 |
+
|
64 |
+
There once was a teacher named Lee
|
65 |
+
Who loved to teach history
|
66 |
+
But then came a pandemic
|
67 |
+
And everything seemed manic
|
68 |
+
And Lee had to learn how to teach virtually
|
69 |
+
|
70 |
+
|
71 |
+
There once was a man from Brazil
|
72 |
+
Whose dance moves were quite the thrill
|
73 |
+
He danced every day
|
74 |
+
In his own special way
|
75 |
+
And everyone watched with goodwill
|
76 |
+
|
77 |
+
|
78 |
+
There once was a snail on a leaf
|
79 |
+
Who thought life was ever so brief
|
80 |
+
But then it started to rain
|
81 |
+
And it felt no more pain
|
82 |
+
And slid down the leaf like a thief
|
83 |
+
|
84 |
+
|
85 |
+
There once was a girl with a pen
|
86 |
+
Who wrote poems again and again
|
87 |
+
But one day she got stuck
|
88 |
+
And her words turned to muck
|
89 |
+
And she had to start over, amen
|
90 |
+
|
91 |
+
|
92 |
+
There once was a man from the moon
|
93 |
+
Who dreamed of coming to Earth soon
|
94 |
+
But when he arrived
|
95 |
+
He was quite deprived
|
96 |
+
And went back to the moon in a swoon
|
97 |
+
|
98 |
+
|
99 |
+
There once was a chef named Sue
|
100 |
+
Whose food was always on cue
|
101 |
+
But one day she tried
|
102 |
+
A new recipe guide
|
103 |
+
And her customers said "Boo hoo"
|
104 |
+
|
105 |
+
|
106 |
+
There once was a boy with a kite
|
107 |
+
That flew so high, it was out of sight
|
108 |
+
But then the string broke
|
109 |
+
And the kite became a joke
|
110 |
+
And the boy had to say goodnight
|
111 |
+
|
112 |
+
|
113 |
+
There once was a girl with a hat
|
114 |
+
That she wore everywhere, even at bat
|
115 |
+
But one day it flew off
|
116 |
+
And she let out a cough
|
117 |
+
And went home feeling quite flat
|
118 |
+
|
119 |
+
|
120 |
+
There once was a bird with a beak
|
121 |
+
That couldn't find anything to eat
|
122 |
+
But then came a worm
|
123 |
+
And the bird had a firm
|
124 |
+
And satisfying meal, oh so sweet
|
125 |
+
|
126 |
+
|
127 |
+
There once was a man with a car
|
128 |
+
That he drove like a superstar
|
129 |
+
But then came a crash
|
130 |
+
And his car was just ash
|
131 |
+
And he had to find a new bar
|
132 |
+
|
133 |
+
|
134 |
+
There once was a woman named Rose
|
135 |
+
Whose garden was the envy of those
|
136 |
+
But then came a storm
|
137 |
+
And the garden was forlorn
|
138 |
+
And Rose had to start over with hose
|
139 |
+
|
140 |
+
|
141 |
+
There once was a boy with a dream
|
142 |
+
To travel to space, or so it would seem
|
143 |
+
He worked hard every day
|
144 |
+
And soon found his way
|
145 |
+
And lived his life in zero-gravity regime
|
146 |
+
|
147 |
+
|
148 |
+
There once was a cat named Jack
|
149 |
+
Who loved to sleep on a sack
|
150 |
+
But one day he fell
|
151 |
+
And it hurt like hell
|
152 |
+
And he woke up with a crack
|
153 |
+
|
154 |
+
|
155 |
+
There once was a man from the west
|
156 |
+
Whose hat was his prize possession, the best
|
157 |
+
But then came the wind
|
158 |
+
And his hat flew, it was thinned
|
159 |
+
And he went on a quest to find it, obsessed
|
160 |
+
|
161 |
+
|
162 |
+
There once was a woman named Sue
|
163 |
+
Who painted the town with a bright hue
|
164 |
+
But one day she ran out
|
165 |
+
And she began to pout
|
166 |
+
And went to the store to buy some new
|
167 |
+
|
168 |
+
|
169 |
+
There once was a boy with a toy
|
170 |
+
That he played with every day, oh boy!
|
171 |
+
But then it broke
|
172 |
+
And he was almost in stroke
|
173 |
+
And had to throw it away, oh noy!
|
174 |
+
|
175 |
+
|
176 |
+
There once was a man with a bike
|
177 |
+
Who liked to go on rides that were alike
|
178 |
+
But then came a hill
|
179 |
+
And his energy was killed
|
180 |
+
And he had to stop and take a hike
|
181 |
+
|
182 |
+
|
183 |
+
There once was a woman with a phone
|
184 |
+
That she used to connect, talk and groan
|
185 |
+
But then came a message
|
186 |
+
And she read with a presage
|
187 |
+
And her heart skipped a beat, all alone
|
188 |
+
|
189 |
+
|
190 |
+
There once was a frog in a pond
|
191 |
+
Who thought he was king, oh so fond
|
192 |
+
But then came a snake
|
193 |
+
And the frog was in stake
|
194 |
+
And his kingdom vanished like a bond
|
195 |
+
|
196 |
+
|
197 |
+
There once was a boy with a book
|
198 |
+
That he read every day with a hook
|
199 |
+
But then came a test
|
200 |
+
And he failed, it was the best
|
201 |
+
And he learned to study more, no rook
|
202 |
+
|
203 |
+
|
204 |
+
There once was a woman from Spain
|
205 |
+
Whose cooking was known as quite insane
|
206 |
+
But then came a guest
|
207 |
+
And the dish was a pest
|
208 |
+
And she had to start over again, with a grain
|
209 |
+
|
210 |
+
|
211 |
+
There once was a man with a nose
|
212 |
+
So big, it got stuck in his clothes
|
213 |
+
He tried to get it out
|
214 |
+
But it was like a trout
|
215 |
+
And he walked around looking like a rose
|
216 |
+
|
217 |
+
|
218 |
+
There once was a woman named Glenda
|
219 |
+
Whose hobby was collecting agenda
|
220 |
+
She had hundreds of them
|
221 |
+
All in a hem
|
222 |
+
And her friends thought she was just a pretenda
|
223 |
+
|
224 |
+
|
225 |
+
There once was a dog with no tail
|
226 |
+
Who liked to chase cars on a trail
|
227 |
+
But then one day he caught one
|
228 |
+
And it was quite fun
|
229 |
+
And the car started wagging like a sail
|
230 |
+
|
231 |
+
|
232 |
+
There once was a boy with a spoon
|
233 |
+
Who liked to use it as a harpoon
|
234 |
+
He aimed for a fish
|
235 |
+
But missed and went swish
|
236 |
+
And ended up in a balloon
|
237 |
+
|
238 |
+
|
239 |
+
There once was a girl with a dress
|
240 |
+
That she wore in a way, quite a mess
|
241 |
+
She put it on upside down
|
242 |
+
And went into town
|
243 |
+
And everyone thought she was just impressed
|
244 |
+
|
245 |
+
|
246 |
+
There once was a man with a hat
|
247 |
+
That he wore even when he sat
|
248 |
+
But then came a bird
|
249 |
+
And the hat was absurd
|
250 |
+
And he went around looking like a rat
|
251 |
+
|
252 |
+
|
253 |
+
There once was a cat named Joe
|
254 |
+
Who liked to eat things that weren't foe
|
255 |
+
He ate a whole cake
|
256 |
+
And a pie in a bake
|
257 |
+
And his belly started to grow
|
258 |
+
|
259 |
+
|
260 |
+
There once was a woman from France
|
261 |
+
Whose cooking was known to enhance
|
262 |
+
She put in too much spice
|
263 |
+
And it wasn't too nice
|
264 |
+
And her guests had to go dance
|
265 |
+
|
266 |
+
|
267 |
+
There once was a boy with a toy
|
268 |
+
That he used to play with, oh boy!
|
269 |
+
He played all day and night
|
270 |
+
And it was quite a sight
|
271 |
+
And his parents thought he was their coy
|
272 |
+
|
273 |
+
|
274 |
+
There once was a man from the moon
|
275 |
+
Who thought he was coming to Earth soon
|
276 |
+
But then he got lost
|
277 |
+
And his mission was tossed
|
278 |
+
And he ended up in a cocoon
|
279 |
+
|
280 |
+
|
281 |
+
There once was a woman with a shoe
|
282 |
+
That she wore every day, like a glue
|
283 |
+
But then came a hole
|
284 |
+
And her foot went cold
|
285 |
+
And she had to buy something new
|
286 |
+
|
287 |
+
|
288 |
+
There once was a frog with a hat
|
289 |
+
That he wore like a cool cat
|
290 |
+
But then came a storm
|
291 |
+
And his hat was the norm
|
292 |
+
And he went on a quest to get back
|
293 |
+
|
294 |
+
|
295 |
+
There once was a boy with a ball
|
296 |
+
That he bounced and bounced, and had a ball
|
297 |
+
But then came a crack
|
298 |
+
And the ball went whack
|
299 |
+
And he had to find something else to enthral
|
300 |
+
|
301 |
+
|
302 |
+
There once was a man with a beard
|
303 |
+
That he thought was quite weird
|
304 |
+
He shaved it one day
|
305 |
+
And went out to play
|
306 |
+
And everyone thought he was a revered
|
307 |
+
|
308 |
+
|
309 |
+
There once was a woman with a cake
|
310 |
+
That she baked and baked, and took a break
|
311 |
+
But then came a mouse
|
312 |
+
And ate the whole house
|
313 |
+
And she had to start from scratch, for Pete's sake!
|
314 |
+
|
315 |
+
|
316 |
+
There once was a boy with a kite
|
317 |
+
That he flew all day and all night
|
318 |
+
But then came a hawk
|
319 |
+
And the kite was a crock
|
320 |
+
And the boy had to find a new sight
|
321 |
+
|
322 |
+
|
323 |
+
There once was a girl with a book
|
324 |
+
That she read in every nook
|
325 |
+
But then came a page
|
326 |
+
That was quite a rage
|
327 |
+
And she had to find a new hook
|
328 |
+
|
329 |
+
|
330 |
+
There once was a man with a car
|
331 |
+
That he drove like a superstar
|
332 |
+
But then came a flat
|
333 |
+
And he had to chat
|
334 |
+
And ended up walking afar
|
335 |
+
|
336 |
+
|
337 |
+
There once was a woman named Marge
|
338 |
+
Whose obsession was with a large
|
339 |
+
She collected them all
|
340 |
+
And hung them on the wall
|
341 |
+
And it looked like a barge
|
342 |
+
|
343 |
+
|
344 |
+
There once was a boy with a bird
|
345 |
+
That he talked to and called "my word"
|
346 |
+
But then came a cat
|
347 |
+
And the bird was a rat
|
348 |
+
And the boy was left feeling absurd
|
349 |
+
|
350 |
+
|
351 |
+
There once was a man with a phone
|
352 |
+
That he used to talk and groan
|
353 |
+
But then came a glitch
|
354 |
+
And it turned into a witch
|
355 |
+
And he was left feeling alone
|
356 |
+
|
357 |
+
|
358 |
+
There once was a girl with a dream
|
359 |
+
To fly to the moon, or so it would seem
|
360 |
+
But then came a storm
|
361 |
+
And her dream was the norm
|
362 |
+
And she was left feeling supreme
|
363 |
+
|
364 |
+
|
365 |
+
There once was a cat with a hat
|
366 |
+
That he wore to the park and all that
|
367 |
+
But then came a dog
|
368 |
+
And the hat was a slog
|
369 |
+
And the cat had to find a new chat
|
370 |
+
|
371 |
+
|
372 |
+
There once was a boy with a ball
|
373 |
+
That he kicked and kicked, and had a ball
|
374 |
+
But then came a net
|
375 |
+
And he was left with regret
|
376 |
+
And had to find a new call
|
377 |
+
|
378 |
+
|
379 |
+
There once was a woman with a spoon
|
380 |
+
That she used to play a funny tune
|
381 |
+
But then came a crowd
|
382 |
+
And it was a little too loud
|
383 |
+
And she had to find a new boon
|
384 |
+
|
385 |
+
|
386 |
+
There once was a man with a hat
|
387 |
+
That he wore even when he sat
|
388 |
+
But then came a bee
|
389 |
+
And it was quite a spree
|
390 |
+
And the man went running like a rat
|
391 |
+
|
392 |
+
|
393 |
+
There once was a dog with a bone
|
394 |
+
That he liked to chew and moan
|
395 |
+
But then came a bird
|
396 |
+
And the bone was a turd
|
397 |
+
And the dog was left with a groan
|
398 |
+
|
399 |
+
|
400 |
+
There once was a boy with a pen
|
401 |
+
That he used to write stories, now and then
|
402 |
+
But then came a spill
|
403 |
+
And the pen went still
|
404 |
+
And he had to find a new den
|
405 |
+
|
406 |
+
|
407 |
+
There once was a woman with a hat
|
408 |
+
That she wore like a mat
|
409 |
+
But then came a gust
|
410 |
+
And the hat turned to dust
|
411 |
+
And the woman was left with a spat
|
412 |
+
|
413 |
+
|
414 |
+
There once was a man with a cat
|
415 |
+
That he trained to wear a hat
|
416 |
+
But then came a mouse
|
417 |
+
And the cat was a grouse
|
418 |
+
And the man had to find a new pat
|
419 |
+
|
420 |
+
|
421 |
+
There once was a girl with a kite
|
422 |
+
That she flew up high and out of sight
|
423 |
+
But then came a storm
|
424 |
+
And the kite was forlorn
|
425 |
+
And the girl was left with a plight
|
426 |
+
|
427 |
+
|
428 |
+
There once was a boy with a bike
|
429 |
+
That he liked to ride and hike
|
430 |
+
But then came a bump
|
431 |
+
And the bike took a dump
|
432 |
+
And the boy was left with a strike
|
433 |
+
|
434 |
+
|
435 |
+
There once was a woman with a phone
|
436 |
+
That she used to talk and moan
|
437 |
+
But then came a beep
|
438 |
+
And the phone went to sleep
|
439 |
+
And the woman was left all alone
|
440 |
+
|
441 |
+
|
442 |
+
There once was a man with a beard
|
443 |
+
That he thought was quite weird
|
444 |
+
But then came a trend
|
445 |
+
And the beard was his friend
|
446 |
+
And the man was quite cheered
|
447 |
+
|
448 |
+
|
449 |
+
There once was a boy with a ball
|
450 |
+
That he kicked around, feeling tall
|
451 |
+
But then came a hole
|
452 |
+
And the ball lost its role
|
453 |
+
And the boy was left with a drawl
|
454 |
+
|
455 |
+
|
456 |
+
There once was a woman with a cake
|
457 |
+
That she baked and baked, feeling awake
|
458 |
+
But then came a burn
|
459 |
+
And the cake took a turn
|
460 |
+
And the woman was left with a quake
|
461 |
+
|
462 |
+
|
463 |
+
There once was a man with a fish
|
464 |
+
That he liked to put on a dish
|
465 |
+
But then came a cat
|
466 |
+
And the fish was flat
|
467 |
+
And the man was left with a swish
|
468 |
+
|
469 |
+
|
470 |
+
There once was a girl with a toy
|
471 |
+
That she played with and felt joy
|
472 |
+
But then came a crack
|
473 |
+
And the toy was a hack
|
474 |
+
And the girl was left feeling coy
|
475 |
+
|
476 |
+
|
477 |
+
|
478 |
+
|
main.py
CHANGED
@@ -19,7 +19,7 @@ def load_base_model():
|
|
19 |
'decapoda-research/llama-7b-hf',
|
20 |
load_in_8bit=True,
|
21 |
torch_dtype=torch.float16,
|
22 |
-
device_map='
|
23 |
)
|
24 |
|
25 |
def load_tokenizer():
|
@@ -371,13 +371,13 @@ def inference_tab():
|
|
371 |
with gr.Column():
|
372 |
# temperature, top_p, top_k, repeat_penalty, max_new_tokens
|
373 |
temperature = gr.Slider(
|
374 |
-
minimum=0.01, maximum=1.99, value=0.
|
375 |
label="Temperature",
|
376 |
info="Controls the 'temperature' of the softmax distribution during sampling. Higher values (e.g., 1.0) make the model generate more diverse and random outputs, while lower values (e.g., 0.1) make it more deterministic and focused on the highest probability tokens."
|
377 |
)
|
378 |
|
379 |
top_p = gr.Slider(
|
380 |
-
minimum=0, maximum=1, value=0.
|
381 |
label="Top P",
|
382 |
info="Sets the nucleus sampling threshold. In nucleus sampling, only the tokens whose cumulative probability exceeds 'top_p' are considered for sampling. This technique helps to reduce the number of low probability tokens considered during sampling, which can lead to more diverse and coherent outputs."
|
383 |
)
|
@@ -389,7 +389,7 @@ def inference_tab():
|
|
389 |
)
|
390 |
|
391 |
repeat_penalty = gr.Slider(
|
392 |
-
minimum=0, maximum=2.5, value=1.
|
393 |
label="Repeat Penalty",
|
394 |
info="Applies a penalty to the probability of tokens that have already been generated, discouraging the model from repeating the same words or phrases. The penalty is applied by dividing the token probability by a factor based on the number of times the token has appeared in the generated text."
|
395 |
)
|
|
|
19 |
'decapoda-research/llama-7b-hf',
|
20 |
load_in_8bit=True,
|
21 |
torch_dtype=torch.float16,
|
22 |
+
device_map={'':0}
|
23 |
)
|
24 |
|
25 |
def load_tokenizer():
|
|
|
371 |
with gr.Column():
|
372 |
# temperature, top_p, top_k, repeat_penalty, max_new_tokens
|
373 |
temperature = gr.Slider(
|
374 |
+
minimum=0.01, maximum=1.99, value=0.1, step=0.01,
|
375 |
label="Temperature",
|
376 |
info="Controls the 'temperature' of the softmax distribution during sampling. Higher values (e.g., 1.0) make the model generate more diverse and random outputs, while lower values (e.g., 0.1) make it more deterministic and focused on the highest probability tokens."
|
377 |
)
|
378 |
|
379 |
top_p = gr.Slider(
|
380 |
+
minimum=0, maximum=1, value=0.75, step=0.01,
|
381 |
label="Top P",
|
382 |
info="Sets the nucleus sampling threshold. In nucleus sampling, only the tokens whose cumulative probability exceeds 'top_p' are considered for sampling. This technique helps to reduce the number of low probability tokens considered during sampling, which can lead to more diverse and coherent outputs."
|
383 |
)
|
|
|
389 |
)
|
390 |
|
391 |
repeat_penalty = gr.Slider(
|
392 |
+
minimum=0, maximum=2.5, value=1.2, step=0.01,
|
393 |
label="Repeat Penalty",
|
394 |
info="Applies a penalty to the probability of tokens that have already been generated, discouraging the model from repeating the same words or phrases. The penalty is applied by dividing the token probability by a factor based on the number of times the token has appeared in the generated text."
|
395 |
)
|