samplers.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. {
  2. "type": "object",
  3. "properties": {
  4. "output": {
  5. "pretty_name": "Outputs",
  6. "type": "object",
  7. "properties": {
  8. "max_tokens": {
  9. "pretty_name": "Max Tokens",
  10. "type": "integer",
  11. "minimum": 16,
  12. "maximum": 4096,
  13. "step": 16,
  14. "default": 16,
  15. "description": "The maximum number of tokens to generate."
  16. },
  17. "max_context_length": {
  18. "pretty_name": "Max Context Length",
  19. "type": "integer",
  20. "minimum": 128,
  21. "maximum": 999936,
  22. "step": 128,
  23. "default": 4096,
  24. "description": "The model's maximum context size."
  25. }
  26. },
  27. "description": "Control the number of tokens to generate or the maximum context length."
  28. },
  29. "sequence": {
  30. "pretty_name": "Sequence",
  31. "type": "object",
  32. "properties": {
  33. "n": {
  34. "pretty_name": "Number of Outputs",
  35. "type": "integer",
  36. "minimum": 1,
  37. "maximum": "20",
  38. "step": 1,
  39. "default": 1,
  40. "description": "The number of outputs to generate."
  41. },
  42. "best_of": {
  43. "pretty_name": "Best of Outputs",
  44. "type": "integer",
  45. "minimum": 1,
  46. "maximum": "20",
  47. "step": 1,
  48. "default": 1,
  49. "description": "The number of outputs to generate and return the best of."
  50. }
  51. },
  52. "description": "Control the number of outputs to generate."
  53. },
  54. "penalties": {
  55. "pretty_name": "Penalties",
  56. "type": "object",
  57. "properties": {
  58. "presence_penalty": {
  59. "pretty_name": "Presence Penalty",
  60. "type": "float",
  61. "minimum": -2,
  62. "maximum": 2,
  63. "step": 0.001,
  64. "default": 0,
  65. "description": "Penalizes tokens based on their presence in the generated text."
  66. },
  67. "frequency_penalty": {
  68. "pretty_name": "Frequency Penalty",
  69. "type": "float",
  70. "minimum": -2,
  71. "maximum": 2,
  72. "step": 0.001,
  73. "default": 0,
  74. "description": "Penalizes tokens based on their frequency in the generated text."
  75. },
  76. "repetition_penalty": {
  77. "pretty_name": "Repetition Penalty",
  78. "type": "float",
  79. "minimum": 1,
  80. "maximum": 3,
  81. "step": 0.001,
  82. "default": 1,
  83. "description": "Penalizes tokens if they were generated in the previous text."
  84. }
  85. },
  86. "description": "Penalize tokens based on their presence, frequency, and repetition in the generated text."
  87. },
  88. "transform": {
  89. "pretty_name": "Transformations",
  90. "type": "object",
  91. "properties": {
  92. "temperature": {
  93. "pretty_name": "Temperature",
  94. "type": "float",
  95. "minimum": 0,
  96. "maximum": 10,
  97. "step": 0.001,
  98. "default": 1,
  99. "description": "Controls the randomness of the generated text."
  100. },
  101. "dynatemp": {
  102. "pretty_name": "Dynamic Temperature",
  103. "type": "object",
  104. "properties": {
  105. "dynatemp_min": {
  106. "pretty_name": "Minimum Temperature",
  107. "type": "float",
  108. "minimum": 0,
  109. "maximum": 10,
  110. "step": 0.001,
  111. "default": 0,
  112. "description": "The minimum temperature value."
  113. },
  114. "dynatemp_max": {
  115. "pretty_name": "Maximum Temperature",
  116. "type": "float",
  117. "minimum": 0,
  118. "maximum": 10,
  119. "step": 0.001,
  120. "default": 0,
  121. "description": "The maximum temperature value."
  122. },
  123. "dynatemp_exponent": {
  124. "pretty_name": "Exponent",
  125. "type": "float",
  126. "minimum": 0.01,
  127. "maximum": 10,
  128. "step": 0.01,
  129. "default": 1,
  130. "description": "The exponent value for dynamic temperature."
  131. }
  132. },
  133. "description": "Dynamically adjust temperature."
  134. },
  135. "smoothing": {
  136. "pretty_name": "Smoothing",
  137. "type": "object",
  138. "properties": {
  139. "smoothing_factor": {
  140. "pretty_name": "Smoothing Factor",
  141. "type": "float",
  142. "minimum": 0,
  143. "maximum": 10,
  144. "step": 0.001,
  145. "default": 0,
  146. "description": "Apply a quadratic smoothing factor to the probability distribution."
  147. },
  148. "smoothing_curve": {
  149. "pretty_name": "Smoothing Curve",
  150. "type": "float",
  151. "minimum": 1,
  152. "maximum": 10,
  153. "step": 0.001,
  154. "default": 1,
  155. "description": "Apply a cubic smoothing curve to the probability distribution."
  156. }
  157. },
  158. "description": "Quadratic and Cubic Sampling methods."
  159. }
  160. },
  161. "description": "Apply transformations to the probability distribution."
  162. },
  163. "probabilistic": {
  164. "pretty_name": "Probabilistic",
  165. "type": "object",
  166. "properties": {
  167. "top_p": {
  168. "pretty_name": "Top P",
  169. "type": "float",
  170. "minimum": 0,
  171. "maximum": 1,
  172. "step": 0.001,
  173. "default": 1,
  174. "description": "The cumulative probability of the top tokens to keep."
  175. },
  176. "top_a": {
  177. "pretty_name": "Top A",
  178. "type": "float",
  179. "minimum": 0,
  180. "maximum": 1,
  181. "step": 0.001,
  182. "default": 0,
  183. "description": "The threshold for the top tokens to keep."
  184. },
  185. "min_p": {
  186. "pretty_name": "Min P",
  187. "type": "float",
  188. "minimum": 0,
  189. "maximum": 1,
  190. "step": 0.001,
  191. "default": 0,
  192. "description": "The minimum probability threshold of the tokens to keep."
  193. },
  194. "top_k": {
  195. "pretty_name": "Top K",
  196. "type": "integer",
  197. "minimum": 0,
  198. "maximum": "1024",
  199. "step": 1,
  200. "default": 0,
  201. "description": "The number of top tokens to keep."
  202. },
  203. "typical_p": {
  204. "pretty_name": "Typical P",
  205. "type": "float",
  206. "minimum": 0,
  207. "maximum": 1,
  208. "step": 0.001,
  209. "default": 1,
  210. "description": "Control the cumulative probability of tokens closest in surprise to the expected surprise to consider."
  211. },
  212. "eta_cutoff": {
  213. "pretty_name": "Eta Cutoff",
  214. "type": "float",
  215. "minimum": 0,
  216. "maximum": 20,
  217. "step": 0.0001,
  218. "default": 0,
  219. "description": "The eta cutoff value."
  220. },
  221. "epsilon_cutoff": {
  222. "pretty_name": "Epsilon Cutoff",
  223. "type": "float",
  224. "minimum": 0,
  225. "maximum": 9,
  226. "step": 0.0001,
  227. "default": 0,
  228. "description": "The epsilon cutoff value."
  229. },
  230. "tfs": {
  231. "pretty_name": "Tail-Free Sampling",
  232. "type": "float",
  233. "minimum": 0,
  234. "maximum": 1,
  235. "step": 0.001,
  236. "default": 1,
  237. "description": "The cumulative curvature of the distribution to keep."
  238. }
  239. },
  240. "description": "Control the probability distribution of the tokens."
  241. },
  242. "mirostat": {
  243. "pretty_name": "Mirostat",
  244. "type": "object",
  245. "properties": {
  246. "mirostat_mode": {
  247. "pretty_name": "Mirostat Mode",
  248. "type": "integer",
  249. "minimum": 0,
  250. "maximum": 2,
  251. "step": 1,
  252. "default": 0,
  253. "description": "The mirostat mode to use. Only mode 2 is supported."
  254. },
  255. "mirostat_tau": {
  256. "pretty_name": "Mirostat Tau",
  257. "type": "float",
  258. "minimum": 0,
  259. "maximum": 20,
  260. "step": 0.01,
  261. "default": 0,
  262. "description": "The target perplexity value that mirostat works towards."
  263. },
  264. "mirostat_eta": {
  265. "pretty_name": "Mirostat Eta",
  266. "type": "float",
  267. "minimum": 0,
  268. "maximum": 1,
  269. "step": 0.001,
  270. "default": 0,
  271. "description": "The rate at which mirostat updates its internal surprisal"
  272. }
  273. },
  274. "description": "An adaptive sampling method that directly controls the perplexity of the generated text."
  275. },
  276. "beam_search": {
  277. "pretty_name": "Beam Search",
  278. "type": "object",
  279. "properties": {
  280. "use_beam_search": {
  281. "pretty_name": "Use Beam Search",
  282. "type": "bool",
  283. "default": false,
  284. "description": "Use beam search to generate the output."
  285. },
  286. "length_penalty": {
  287. "pretty_name": "Length Penalty",
  288. "type": "float",
  289. "minimum": -5,
  290. "maximum": 5,
  291. "step": 0.1,
  292. "default": 1,
  293. "description": "The length penalty value."
  294. },
  295. "early_stopping": {
  296. "pretty_name": "Early Stopping",
  297. "type": "bool",
  298. "default": false,
  299. "description": "Stop the beam search when at least `best_of` sentences are finished per batch."
  300. }
  301. },
  302. "description": "Control the beam search parameters."
  303. },
  304. "stops": {
  305. "pretty_name": "Stop Sequences",
  306. "type": "object",
  307. "properties": {
  308. "stop": {
  309. "pretty_name": "Stopping Strings",
  310. "type": "array",
  311. "items": {
  312. "type": "string"
  313. },
  314. "default": [],
  315. "description": "The strings to stop the generation at."
  316. },
  317. "stop_token_ids": {
  318. "pretty_name": "Stopping Token IDs",
  319. "type": "array",
  320. "items": {
  321. "type": "integer"
  322. },
  323. "default": [],
  324. "description": "The token IDs to stop the generation at."
  325. },
  326. "ignore_eos": {
  327. "pretty_name": "Ignore EOS",
  328. "type": "bool",
  329. "default": false,
  330. "description": "Ignore the End of Sequence token and continue generating."
  331. }
  332. },
  333. "description": "Stop the generation at specific strings or token IDs."
  334. },
  335. "logprobs": {
  336. "pretty_name": "Log Probabilities",
  337. "type": "object",
  338. "properties": {
  339. "logprobs": {
  340. "pretty_name": "Log probabilities",
  341. "type": "integer",
  342. "minimum": 0,
  343. "maximum": 10,
  344. "step": 1,
  345. "default": "null",
  346. "description": "The number of log probabilities to return for output tokens."
  347. },
  348. "prompt_logprobs": {
  349. "pretty_name": "Prompt Log probabilities",
  350. "type": "integer",
  351. "minimum": 0,
  352. "maximum": 10,
  353. "step": 1,
  354. "default": "null",
  355. "description": "The number of log probabilities to return for prompt tokens."
  356. }
  357. },
  358. "description": "Return log probabilities for tokens."
  359. },
  360. "logit_processors": {
  361. "pretty_name": "Logits Processors",
  362. "type": "object",
  363. "properties": {
  364. "custom_token_bans": {
  365. "pretty_name": "Custom Token Bans",
  366. "type": "array",
  367. "items": {
  368. "type": "integer"
  369. },
  370. "default": [],
  371. "description": "The token IDs to ban from being generated."
  372. },
  373. "logit_bias": {
  374. "pretty_name": "Logit Bias",
  375. "type": "array",
  376. "items": {
  377. "type": "array",
  378. "items": {
  379. "type": "integer"
  380. },
  381. "minItems": 2,
  382. "maxItems": 2
  383. },
  384. "default": [],
  385. "description": "The token ID and bias value to add to the logits."
  386. }
  387. },
  388. "description": "Process the logits before generating the output."
  389. },
  390. "misc": {
  391. "pretty_name": "Miscellaneous",
  392. "type": "object",
  393. "properties": {
  394. "seed": {
  395. "pretty_name": "Seed",
  396. "type": "integer",
  397. "minimum": "-inf",
  398. "maximum": "inf",
  399. "step": 1,
  400. "default": "null",
  401. "description": "The seed value for the random number generator."
  402. },
  403. "skip_special_tokens": {
  404. "pretty_name": "Skip Special Tokens",
  405. "type": "bool",
  406. "default": true,
  407. "description": "Skip special tokens in the generated output."
  408. },
  409. "spaces_between_special_tokens": {
  410. "pretty_name": "Spaces Between Special Tokens",
  411. "type": "bool",
  412. "default": true,
  413. "description": "Add spaces between special tokens in the generated output."
  414. },
  415. "include_stop_str_in_output": {
  416. "pretty_name": "Include Stop String in Output",
  417. "type": "bool",
  418. "default": false,
  419. "description": "Include the stop string in the generated output."
  420. }
  421. },
  422. "description": "Miscellaneous settings."
  423. }
  424. }
  425. }