YouTube2Text

YouTube transcript (-Ggc37xLj_Y) — Transcript

9,464 words · 1,383 segments · language en · Watch on YouTube

Full transcript

  1. 0:05So today we're going to talk about
  2. 0:08inference scaling. Um we briefly hinted
  3. 0:10on this uh in the first lecture. So
  4. 0:13there are three stages for LLM kind of
  5. 0:16development. The first one is
  6. 0:18pre-training. This stage historically
  7. 0:21takes a lot more time. It could take
  8. 0:23several months. a whole lot of uh GPUs
  9. 0:27uh that are used for training these. Um
  10. 0:30and then there's a fine-tuning step.
  11. 0:32Usually this is a less or historically
  12. 0:35has been a less kind of compute intense
  13. 0:38process. If you're talking about
  14. 0:41trillions of uh data tokens in the
  15. 0:43pre-training side on the fine-tuning
  16. 0:46side, this is orders of magnitude less
  17. 0:48data that we use for fine-tuning. And
  18. 0:50then there is the inference part where
  19. 0:52we get to use the model and uh we are
  20. 0:56going to see different ways that at
  21. 0:58inference time we can make the model be
  22. 1:01better and become more useful without
  23. 1:03changing uh the parameters of the model
  24. 1:06and without any kind of uh fine-tuning
  25. 1:10of the models.
  26. 1:12So uh let's first start with the large
  27. 1:15language monkeys paper. Again, uh you
  28. 1:18are familiar with the infinite monkey
  29. 1:19theorem by now because we discussed it
  30. 1:21on uh uh Monday. But to recap, the idea
  31. 1:26of this paper is that we have an LLM and
  32. 1:29we have a problem as input. Instead of
  33. 1:32generating the response for this problem
  34. 1:35only once, we are going to repeatedly
  35. 1:37ask the same input problem again and
  36. 1:40again. Uh this could be a number of
  37. 1:42times, it could be 10 times, 100 times
  38. 1:44and so on. uh and we will see how that
  39. 1:46affects the performance and then we are
  40. 1:49going to have a verifier that can tell
  41. 1:50us which one of these responses were the
  42. 1:53correct response
  43. 1:55and then that is going to be the output
  44. 1:58of this system.
  45. 2:01The reason we like that is that by doing
  46. 2:04this repeated sampling, we can make
  47. 2:06models that are inferior. For example, a
  48. 2:09llama 38B or 7P that is um not as
  49. 2:14capable at GPT40 with single attempt. By
  50. 2:17by doing this repeated sampling and
  51. 2:20selecting the correct one among the
  52. 2:22generated
  53. 2:24candidates, we can um significantly
  54. 2:28improve the performance of these
  55. 2:29inferior models and make them better
  56. 2:31than these uh larger and proprietary
  57. 2:35ones. And these are here you can see
  58. 2:37examples across uh really hard math
  59. 2:40coding uh uh and different styles of
  60. 2:44math problem uh question answering
  61. 2:46problems.
  62. 2:49Is that is this clear to everyone? Um it
  63. 2:53just seems like the models and smaller
  64. 2:55models already know the answers to these
  65. 2:57hard problems and we are just like by
  66. 2:59doing this repeated sampling we are kind
  67. 3:01of eliciting those and surfacing those
  68. 3:05answers.
  69. 3:06It just they don't and they they just
  70. 3:08don't tell us that in the first trial.
  71. 3:12Um now this um
  72. 3:16uh kind of paradigm of repeated sampling
  73. 3:19works well across pretty much any domain
  74. 3:21that we have tried in so far including
  75. 3:24agentic uh benchmarks such as bbench
  76. 3:27which kind of mimics like how a software
  77. 3:30engineer goes about um editing code and
  78. 3:33creating new patches. Um so here we are
  79. 3:37seeing the coverage meaning uh the the
  80. 3:40the uh fraction of problems that are
  81. 3:43solved by at least one of the samples
  82. 3:46and here on the x-axis we have the
  83. 3:48number of samples going from one to a
  84. 3:50thousand and what we are seeing here is
  85. 3:53that a model such as deepseek um
  86. 3:58can u uh I I believe this was the
  87. 4:01deepseek v3 model can perform can
  88. 4:04outperform models such as claw 3.5 or 01
  89. 4:08uh preview um after a thousand samples
  90. 4:12like it can solve more coding and
  91. 4:13software engineering problems than those
  92. 4:16and the reason this is interesting is
  93. 4:18that we are doing um uh in this case for
  94. 4:22coding problems if we have unit tests
  95. 4:24that can that we can use to select which
  96. 4:28one of these samples is correct then we
  97. 4:30have an end toend automated way to
  98. 4:32create a more capable model um out of
  99. 4:36this in this case out of Deepseek and
  100. 4:38open source model.
  101. 4:43Um now again we saw pre-training scaling
  102. 4:47laws in the last class uh and that was
  103. 4:51we can predictably
  104. 4:53uh kind of reduce the test loss given
  105. 4:56these equations in in this paper and
  106. 4:58these equations might might change given
  107. 5:00the setup but there is a predictable
  108. 5:03path to increase data uh amount of
  109. 5:06compute used and the number of
  110. 5:08parameters in the model and use that uh
  111. 5:10to kind of uh predict or reduce the test
  112. 5:14loss. So this is for pre-training but it
  113. 5:17turns out we can define a similar
  114. 5:20scaling loss but this time for inference
  115. 5:23or test time compute. Um and that is
  116. 5:26something that we showed in this paper.
  117. 5:28Basically you're showing that the
  118. 5:29relationship between co coverage and the
  119. 5:33number of samples that are being drawn
  120. 5:35in parallel from the model follow an
  121. 5:38exponential power law. So assume this C
  122. 5:40is coverage meaning how many problems
  123. 5:43are solved by at least one of the
  124. 5:45samples and then K is the number of
  125. 5:48samples and A and B are these kind of
  126. 5:50coefficient that we can find through
  127. 5:53this uh the carefidding parameters that
  128. 5:55we can find through this scaling uh kind
  129. 5:58of u uh scaling behavior of the model.
  130. 6:03So concretely um as we scaled the number
  131. 6:07of samples across a range of models from
  132. 6:10llama 3 8b 7eb and models like gemma or
  133. 6:15pithia uh and this is for various range
  134. 6:18of parameter sizes going from 70 million
  135. 6:21parameter parameters all the way to 70
  136. 6:24billion parameters. We can see that we
  137. 6:26can u predict this power law and have a
  138. 6:29have a have a predicted curve that um
  139. 6:34closely for for the most part very
  140. 6:36closely follows the actual u practical
  141. 6:40kind of coverage that we are seeing as
  142. 6:42we increase the number of samples. So
  143. 6:44basically the way to think about it is
  144. 6:46that we can we can predict how many
  145. 6:49sample to achieve a certain coverage how
  146. 6:53many samples we're going to need to and
  147. 6:56and how much we should how much
  148. 6:58resources we should allocate to achieve
  149. 6:59that.
  150. 7:06Um and again the these curves show that
  151. 7:09this behavior is true for a range of
  152. 7:13models and a range of parameter sizes.
  153. 7:15Again I think one of the very
  154. 7:18interesting properties that we saw here
  155. 7:19is that for a very small model like a 70
  156. 7:22million parameter we also see this
  157. 7:25scaling behavior and of course this is
  158. 7:27true for much larger models as well and
  159. 7:30it is true across domains.
  160. 7:33Now, uh we uh we looked a bit more into
  161. 7:38why we see this um kind of paral law
  162. 7:41behavior in in in repeated sample
  163. 7:44sampling. um because it's it might be at
  164. 7:48first a little non-intuitive because if
  165. 7:51the probability of um
  166. 7:56the pass atmon being correct the
  167. 7:58probability of a correct response to a
  168. 8:01to a question is for example P then we
  169. 8:05can calculate the probability of um at
  170. 8:09least one of the answers being correct
  171. 8:11at K for an individual problems. So for
  172. 8:15problem I, if we have the pass at one
  173. 8:18for problem I, we can calculate directly
  174. 8:22what is pass at K for problem I with
  175. 8:25this um exponential equation. I hope
  176. 8:29this is clear for everybody. But
  177. 8:30basically this 1 minus P is the
  178. 8:33probability of the first like K answers
  179. 8:35not being correct and then one minus
  180. 8:38that is the probability of at least one
  181. 8:40of these K answers being correct. So
  182. 8:42this is for an individual problem.
  183. 8:45But what we are seeing that across a
  184. 8:47suite of problems we are seeing the
  185. 8:50expon the power law uh scaling law
  186. 8:53meaning across um AC across these
  187. 8:58problems we are seeing the the the
  188. 9:01equations are changing. So the question
  189. 9:03that we wanted to answer is that how
  190. 9:05does this what kind of behavior should
  191. 9:08we see across uh the problem examples in
  192. 9:11a data set that justifies our
  193. 9:14exponential um uh sorry our power loss
  194. 9:18scaling loss. Um and by looking into
  195. 9:21that further um uh what uh what was
  196. 9:26observed is that in order to have the
  197. 9:29scaling laws that we observed there has
  198. 9:31to be the sufficient and necessary
  199. 9:33condition for it is that we have a long
  200. 9:37tail of hard problems.
  201. 9:40Um
  202. 9:42basically from a ma mathematical
  203. 9:44perspective we are going to need that
  204. 9:46because this is the the power law
  205. 9:48scaling. This is the per problem uh
  206. 9:51exponential scaling laws and this is
  207. 9:54like this kind of these sort we need to
  208. 9:56have these sort of cur curve for the
  209. 9:58pass at one of problems in order to
  210. 10:01justify this um uh power loss scaling.
  211. 10:05And empirically when we looked into the
  212. 10:09problems we saw that this condition
  213. 10:11holds. And again what this condition is
  214. 10:14is that we have a long tail uh of really
  215. 10:19hard hard problems on the most on the
  216. 10:21most complex side of things. For
  217. 10:23example, um let's take a look at this
  218. 10:26model and and the count of uh the count
  219. 10:30of problems that are solved at passad
  220. 10:32one and uh at more and more samples. It
  221. 10:36seems like across all these problems, a
  222. 10:39large portion of problems are simpler
  223. 10:41and they're solved in pass one. And as
  224. 10:43we increase the complexity of the
  225. 10:45problems uh where the pass one
  226. 10:48probability is going to become lower and
  227. 10:50lower we have like a long pair of
  228. 10:52problems that kind of have that
  229. 10:54property.
  230. 10:56So these kind of curve that you see here
  231. 10:58from high at simpler problems and low at
  232. 11:02harder and harder problems meaning lower
  233. 11:04and lower pass at one is the type of
  234. 11:06problems is the type of behavior that we
  235. 11:09are seeing across these uh task and that
  236. 11:12is why uh we can see the the scaling
  237. 11:15loss that we that that we have that we
  238. 11:17have observed.
  239. 11:20Now
  240. 11:22um
  241. 11:24what this means for
  242. 11:27the the science and the engineering
  243. 11:30around LLMs is that while previously
  244. 11:34companies would would spend hundreds of
  245. 11:36millions of dollars or billion of dollar
  246. 11:39uh billions of dollar on pre-training
  247. 11:41alone and then a lot less on fine-tuning
  248. 11:44and then almost like nothing at each
  249. 11:47inference call because it used to be
  250. 11:49like a on time back and forth between
  251. 11:51the user and query and the model. Now we
  252. 11:54have a new paradigm where we can spend a
  253. 11:57whole lot more compute on inference and
  254. 12:00use that to increase the capability of
  255. 12:02model and this compute the inference
  256. 12:04compute can be done offline. We can kind
  257. 12:07of uh release our agents to go solve a
  258. 12:10problem and just keep generating tokens
  259. 12:12and keep uh improving the the the
  260. 12:15quality of the answers that they
  261. 12:17generate.
  262. 12:19Um now when we talk about this repeated
  263. 12:23sampling something that that's important
  264. 12:26to
  265. 12:28kind of have in mind is the need for
  266. 12:30automated verification because if you
  267. 12:33have a bunch of samples we still need to
  268. 12:35know which one of them are the correct
  269. 12:38ones and how to go about selecting them.
  270. 12:41um
  271. 12:43in certain domains uh verification is
  272. 12:46easier than the others. For example, for
  273. 12:49certain types of math problems, you can
  274. 12:53use formal formal proofs. So given a a
  275. 12:57proof u strategy, we can run them by
  276. 13:00these formal proof kind of software
  277. 13:02tools to verify whether each step is
  278. 13:05correct or not. Um we can write unit
  279. 13:08tests for coding and um in some cases
  280. 13:12writing a unit test arguably arguably is
  281. 13:15a much simpler task than writing the
  282. 13:17entire program that solves a problem.
  283. 13:20Right? So the unit test can be written
  284. 13:22for example by humans um and um we can
  285. 13:26use that as our verifier.
  286. 13:29Um there are other cases like AI as a
  287. 13:32compiler and this is one of the projects
  288. 13:34in the lab. um that and a direction that
  289. 13:37I'm very excited about and that is when
  290. 13:40we can generate compiler like lower
  291. 13:42level code like CUDA for a source code
  292. 13:45like P pietorch with LLM and the reason
  293. 13:48this is verifiable is that um for
  294. 13:52example here we can always
  295. 13:55um compare the output of CUDA with the
  296. 13:59source PyTorch and see if they're the
  297. 14:02same for for any given input. Right? So
  298. 14:05we don't need if we want to say whether
  299. 14:06the model has generate has generated the
  300. 14:09correct CUDA code for our source PyTorch
  301. 14:12code we can just see um whether their
  302. 14:16outputs match for any for any inputs.
  303. 14:20Um
  304. 14:22for those of you who are not familiar
  305. 14:23for CUDA, I hope you you all are, but
  306. 14:25it's like a lower level language for
  307. 14:28writing uh more hardware aware and
  308. 14:31optimized for hardware code uh for on on
  309. 14:35GPUs.
  310. 14:37Um for example, here um we we have a
  311. 14:42data set or a benchmark on CUDA
  312. 14:45generation called kernel bench. And here
  313. 14:47again we are seeing the same s sort of
  314. 14:50uh linear improving coverage uh in this
  315. 14:54case for CUDA code generation as we
  316. 14:56increase the number of samples that we
  317. 14:58take from the model. And in this case we
  318. 15:01have this again by by default perfect
  319. 15:04verifier that we can use for um
  320. 15:07measuring the correctness of our CUDA
  321. 15:10generated code.
  322. 15:13And and there are other examples of this
  323. 15:15um other any basically any kind of
  324. 15:19translation between two languages. If
  325. 15:22you want to like port from Python or C++
  326. 15:25to Java or vice versa. This is again
  327. 15:28this is true. You can measure the the
  328. 15:30equivalency
  329. 15:32uh much easier. Um now there are domains
  330. 15:35that we don't have verifier for and in
  331. 15:39those domains what we observe was that
  332. 15:41there is a large gap between best of end
  333. 15:44methods uh such as majority v voting um
  334. 15:49and uh and model based rankers and what
  335. 15:52is the true coverage of the model. Let's
  336. 15:55take a look at one example here. Um so
  337. 15:59here we compared a few different
  338. 16:00methods. We are going to learn about
  339. 16:02reward models or verifiers on Monday
  340. 16:05more but let's take a look at these
  341. 16:07examples. So we have a number of samples
  342. 16:10and then we are measuring the success
  343. 16:12rate here like basically what would be
  344. 16:15the output of this system. Um majority
  345. 16:18voting or the green one is we we just
  346. 16:21see which answer among the generated
  347. 16:23answers has um appeared the most. So
  348. 16:27based on that we just select that answer
  349. 16:30or that response as the output of our
  350. 16:32system. Does that make sense? It's just
  351. 16:35majority voting. And uh the blue line
  352. 16:38here is coverage. This is assuming we
  353. 16:40had a perfect selector or verifier in
  354. 16:43this case. And as you can see here,
  355. 16:45there is a large difference between
  356. 16:47majority voting which plateau plateaus
  357. 16:50after 10 or 50 samples and what we could
  358. 16:54possibly get if we had a perfect
  359. 16:56verifier. So this is a very very large
  360. 16:59gap. Um especially and this gap is even
  361. 17:04more pronounced if you have harder
  362. 17:06problems. So for example the math
  363. 17:08capital math here data set is a harder
  364. 17:10more complex data set than GSM8K
  365. 17:13and we here we we compared other methods
  366. 17:16like using a reward model and com add
  367. 17:19and um that uh generates that measures
  368. 17:24gives a reward per answer and we take
  369. 17:27the best of best of those or ways to
  370. 17:30combine these two we'll learn more about
  371. 17:32these reward models basically they're
  372. 17:35LLM based
  373. 17:36kind of LLMs that are trained to to kind
  374. 17:40of um score their the response quality
  375. 17:44and even with those there is a large cap
  376. 17:46gap. Uh and this is what we call the
  377. 17:50generation verification gap. So the
  378. 17:53generation it turns out we can generate
  379. 17:55a lot of good responses but the
  380. 17:58verification is this basically this gap
  381. 18:01is tells us how much we can actually
  382. 18:03capture those responses or those uh
  383. 18:05correct answers.
  384. 18:08Um, the reason methods such as majority
  385. 18:11voting doesn't work is that as we look
  386. 18:14into the quality of answers, it turns
  387. 18:18out that for some problems that are
  388. 18:21hardest to solve, sometimes we see that
  389. 18:24they were solved maybe even once or two
  390. 18:27times or three times across the thousand
  391. 18:31or 10,000 samples that we take from the
  392. 18:33model. So these correct problems um uh
  393. 18:38are actually very rarely solved by the
  394. 18:41model with the samples that we are
  395. 18:43taking from it. So it makes sense that a
  396. 18:45majority voting mechanism cannot capture
  397. 18:48those because they're rare. But for many
  398. 18:52of the problems in this case especially
  399. 18:54for the GSM8K which is simpler because
  400. 18:57uh the the answers or responses are more
  401. 19:00are simpler to generate majority voting
  402. 19:02works for many of the problems. But even
  403. 19:05even in this case for some of the
  404. 19:07hardest problems the frequency of
  405. 19:10correct answer is actually pretty low.
  406. 19:14So that makes it harder from a
  407. 19:15verification perspective. How do you how
  408. 19:17do you find them? How do you find out
  409. 19:19which ones are correct?
  410. 19:22Um, now I want you to here are some
  411. 19:25questions that some discuss discussion
  412. 19:28questions that I want to put it here for
  413. 19:31like something like 2 minutes or so and
  414. 19:33I want you to think about it and
  415. 19:36hopefully we'll have some volunteers
  416. 19:38uh or our I um and volunteer some of you
  417. 19:43to answer some of them. So, two minutes
  418. 19:46for this.
  419. 19:48Maybe we talk after.
  420. 19:54>> Okay, let's get back.
  421. 19:57Who wants to answer question one?
  422. 20:01This I I I I'm very interested in how
  423. 20:03you would build on this if you were if
  424. 20:06you were to do some research here or or
  425. 20:09what what you what uh database you you
  426. 20:12got from these papers.
  427. 20:17anyone?
  428. 20:21>> Yes. Like one takeaway is that uh
  429. 20:25sampling many uh answers and can shoot
  430. 20:31like if you have a good verifier it
  431. 20:33really helps with your
  432. 20:36and the second take away is that the the
  433. 20:39quality of the verifier is very
  434. 20:41important of doing this approach.
  435. 20:44>> That's right.
  436. 20:49>> Anything else?
  437. 20:51Yes.
  438. 20:58>> Examples for example [clears throat]
  439. 21:01like the model generally the solutions
  440. 21:04and the model or each of the solution
  441. 21:08that I need to generate a new solution
  442. 21:12even if you're not sure the solution is
  443. 21:16>> are you talking about revising a
  444. 21:17solution
  445. 21:19>> uh yeah
  446. 21:20>> by next
  447. 21:21Yeah.
  448. 21:21>> Okay. We're going to hear about it in a
  449. 21:24minute.
  450. 21:25>> Sounds good. Yes.
  451. 21:27>> I'm looking at it in two directions. One
  452. 21:29is the science for safe and accuracy.
  453. 21:32And for that um I will look at a hybrid
  454. 21:35approach where I will develop a
  455. 21:37knowledge graph along with a advanced RA
  456. 21:41documentation method and then returns to
  457. 21:44the RA method when I do the inance time
  458. 21:47score is lesser on the accuracy and more
  459. 21:50or less rely on the knowledge to give
  460. 21:53you more accurate answers. That way you
  461. 21:55can increase the speed of the answer
  462. 21:59while also maintaining accuracy. So you
  463. 22:01were suggesting we use rack to to uh
  464. 22:04boost
  465. 22:06>> or compare we go with the knowledge
  466. 22:10first and then only when um we feel that
  467. 22:13the accuracies that are coming have to
  468. 22:14come up we go through because rag also
  469. 22:17learns the uh time and there is um
  470. 22:21>> yeah so you're asking rag can help with
  471. 22:23the efficiency in the time find time
  472. 22:25domain
  473. 22:25>> we're trying to reduce the dependency on
  474. 22:29to increase the accuracy
  475. 22:33Okay, one more. Maybe you were waiting.
  476. 22:36>> Um, yeah. So, I think something that I
  477. 22:38thought about also is just um a even if
  478. 22:42it's
  479. 22:44easy to medium level of difficulty
  480. 22:46respect or verification or like
  481. 22:48verifiable domains. Um
  482. 22:51this it it would be cool to see sort of
  483. 22:54how uh past K changes with respect to K
  484. 22:57when we kind of employ sort of initial
  485. 22:59search techniques like almost like a
  486. 23:01self-study approach. if there's some way
  487. 23:03to maybe consolidate like let's let the
  488. 23:05model explore this domain gather
  489. 23:08insights as if you know you're not
  490. 23:09asking it to sample any solutions yet
  491. 23:12and maybe that can get you know related
  492. 23:14to some output context and we can then
  493. 23:16follow into parallel sampling and we
  494. 23:17might see maybe better trends um with
  495. 23:19respect to
  496. 23:20>> absolutely
  497. 23:21>> and we're going to learn about some of
  498. 23:22the ways to improve test time scaling
  499. 23:25beyond just repeated sampling
  500. 23:27>> um including self-study search and tool
  501. 23:29use um maybe one more.
  502. 23:34>> Yes.
  503. 23:35>> Um well, one interesting might be like
  504. 23:39verifiers. Um I think like without a
  505. 23:43good verifier, then the best you can do
  506. 23:45is exactly as what you showed in the
  507. 23:47previous slide usually doesn't work very
  508. 23:48well for hard problems. But maybe there
  509. 23:50are some hard problems where like it's
  510. 23:53hard to identify if an answer is correct
  511. 23:55because it's too expensive or doesn't
  512. 23:58it's just too hard.
  513. 24:00But it's easy to find like an answer is
  514. 24:02wrong, right? So you can like project um
  515. 24:05like bad answers. Maybe that would be
  516. 24:06more obvious in terms of thinking and
  517. 24:08then you can just keep like
  518. 24:12an evolutionary pattern. So I guess one
  519. 24:14interesting direction would be like
  520. 24:16trying to look at different domains
  521. 24:17where like
  522. 24:20right and also maybe verification is not
  523. 24:22fully accurate. Maybe it's a bit lost
  524. 24:24like they verify it's it own model
  525. 24:26because of the simulation. It's like a
  526. 24:29physics or like a dynamic simulation,
  527. 24:31robotics, something how you would.
  528. 24:34>> Yeah, basically there are other ways to
  529. 24:36filter out the incorrect answers. Maybe
  530. 24:39use a simulation or some
  531. 24:44other tool use or another model to do
  532. 24:47that depending on the domain. So the all
  533. 24:50of the data set here the 10,000
  534. 24:52different samples per problem is
  535. 24:55available on on on hugging face if
  536. 24:57anybody is interested to go around how
  537. 24:59to kind of improve like shrink that
  538. 25:02generation verification gap. Um that
  539. 25:05could be a potentially a good research
  540. 25:07project for the for the course. Um yes
  541. 25:11last question. Yeah. Could one try to
  542. 25:14generate multiple verifiers like maybe
  543. 25:17generate 10,000 verifiers and then do a
  544. 25:19majority deing like what the result
  545. 25:23verifiers?
  546. 25:24>> Yes,
  547. 25:26that's also a very interesting research
  548. 25:27question. So on Monday we're going to
  549. 25:29learn about this we work that we've done
  550. 25:33on ensembling but like a week supervised
  551. 25:36ensembling of verifiers. We don't have a
  552. 25:37thousand of them, but we can have 10 or
  553. 25:4020 of them. But that direction is
  554. 25:42definitely also interesting. It's very
  555. 25:44costly though from a compute
  556. 25:46perspective. Um maybe we should move on
  557. 25:48to the any any other like about the the
  558. 25:51other two questions. Anything? Um I
  559. 25:54think we discussed some of it in our
  560. 25:56discussion but anything that you want to
  561. 25:58share last minute? Yes.
  562. 26:01to what extent was it investigated
  563. 26:03whether the coverage number could be
  564. 26:06[clears throat] like engineering task
  565. 26:07for example like it could be test cases
  566. 26:09but it's actually not
  567. 26:11>> yeah for like for example for the math
  568. 26:13problems we manually looked into the to
  569. 26:16the answered questions and it was
  570. 26:18something above like a 90 like 7 8% by
  571. 26:23manually checking that but that's also
  572. 26:25always a a a case for a failure mode if
  573. 26:29your unit tests don't have true coverage
  574. 26:31of the code.
  575. 26:33>> So the quality of the verifier matters.
  576. 26:37>> Yes.
  577. 26:37>> Yeah. Maybe it's more
  578. 26:41generating it like trees. So but you're
  579. 26:44verifying each note.
  580. 26:45>> Yeah. Let's talk about that and what's
  581. 26:48coming next and how we can make
  582. 26:52uh different ways of uh test time
  583. 26:54scaling. So with the monkeys framework
  584. 26:57we we we see we saw that repeated
  585. 27:00sampling is effective but there are
  586. 27:01other ways to uh scale sampling and
  587. 27:04let's take a look at this paper uh
  588. 27:06scaling LLM test time compute optimally
  589. 27:10can be more effective than uh scaling
  590. 27:12model parameters. We're going to touch
  591. 27:13on certain as aspects of it that is most
  592. 27:16relevant to test time scaling. So there
  593. 27:19are two way like parallel sampling is
  594. 27:21one way for us to generate multiple
  595. 27:24answers per input question.
  596. 27:27But there is another way to generate or
  597. 27:30generate answers or use test time
  598. 27:32scaling to improve the quality and that
  599. 27:35is when we do sequential revisions. For
  600. 27:38example, we the model comes up with one
  601. 27:41initial steps of the problem or one
  602. 27:43initial approach for solving the problem
  603. 27:46and it keeps revising that or it keeps
  604. 27:50like improving and adding to that and
  605. 27:52that is the sequential approach. So
  606. 27:54instead of asking the model multiple
  607. 27:56times, we let the model know that it can
  608. 27:59keep revising its answers, look into
  609. 28:02that from a different angles and um and
  610. 28:05continue doing so until it's confident
  611. 28:08that it's ready to generate an answer
  612. 28:10and then finally output that. Yes.
  613. 28:12>> So is this by our own printing or is the
  614. 28:15model system?
  615. 28:17>> Um in this case, let's let's assume by
  616. 28:19our own prompting prompting. But when
  617. 28:21you look at the reasoning models, they
  618. 28:23are now trained like internally we have
  619. 28:25we see this kind of behavior in them. So
  620. 28:28they do this um uh revisions uh
  621. 28:32sometimes in their own answers. Um now
  622. 28:36there is another way to scale test time
  623. 28:39compute and that is how much how we
  624. 28:42select the answers. So for the parallel
  625. 28:45sampling, we we looked into the outcome
  626. 28:48like there are n different responses. We
  627. 28:50look into the outcome and see if they're
  628. 28:52correct or not. We mentioned unit test
  629. 28:55and so on. But there's also this other
  630. 28:57way of learning base or outcome reward
  631. 29:00models where they where they look into
  632. 29:02the outcome and and say whether they're
  633. 29:04correct or not. Of course, their
  634. 29:07accuracy or quality can be limited,
  635. 29:09especially if we uh go to new domains,
  636. 29:12but outcomebased reward model is another
  637. 29:15way that they look into the final answer
  638. 29:17and they generate a score. Basically,
  639. 29:19these models are trained to um to give a
  640. 29:22reward based on an output. Then there is
  641. 29:25also the process reward models. So in
  642. 29:29the difference between process and
  643. 29:30outcome is that process reward models
  644. 29:33are designed to give a score per step of
  645. 29:37the generated solution. For example, we
  646. 29:39have a math problems. There are like
  647. 29:41five steps that the model takes before
  648. 29:44generating a solution.
  649. 29:46outcome reward mo sorry process reward
  650. 29:48models again we learn about this more on
  651. 29:50Monday I believe um are trained to give
  652. 29:54a score for the steps of the generation
  653. 29:58so that's the difference between the two
  654. 30:02uh now for best of end sampling with a
  655. 30:04verifier again the problem is easy we
  656. 30:06generate parallel samples and then we
  657. 30:09can use an outcomebased reward model um
  658. 30:12to to see which one has the highest
  659. 30:14score and then take that as um as our
  660. 30:18answer.
  661. 30:20Then there are um other ways that we can
  662. 30:24bring these reward models into the
  663. 30:27processing into the into our test time
  664. 30:29scaling framework. For example, here
  665. 30:32let's assume at each level of this
  666. 30:35answering this question, we can take
  667. 30:37four s we have a budget of four samples.
  668. 30:39uh we take these four samples and then
  669. 30:42here use a process reward model or PRM
  670. 30:45to to kind of like in this case we
  671. 30:49select the top two uh with the highest
  672. 30:51score from our PRM. Then again we sample
  673. 30:54from them uh and and and and we continue
  674. 31:00and we can have a threshold on what how
  675. 31:03the to for selecting the top kind of um
  676. 31:07two two kind responses in this case and
  677. 31:10expanding the tree from there. So here
  678. 31:12we are doing a beam search approach to
  679. 31:16that uses the process reward model to
  680. 31:18guide how we are sampling our model. Is
  681. 31:21that clear?
  682. 31:24Yes.
  683. 31:24>> How do you choose the option
  684. 31:27>> based on the PRM score? So the process
  685. 31:29reward model is trained to generate a
  686. 31:33score imagine between zero and one based
  687. 31:36on the a step given given the question
  688. 31:39and or or just a step alone
  689. 31:44>> is the PR function from the language
  690. 31:46model. Yes, PRMs are generally also fine
  691. 31:50from a language model. As you can
  692. 31:52imagine, they would work better for in
  693. 31:54domain kind of types of task. So, if you
  694. 31:57have a certain task that you want to uh
  695. 32:00a certain benchmark that you want to
  696. 32:02optimize for, of course, training a PRM
  697. 32:04on a like a subset of that task helps
  698. 32:07you with test time scaling on that task
  699. 32:09better than across new task. uh but
  700. 32:12because they're language model based
  701. 32:14they they do exhibit some generalization
  702. 32:16across task as well.
  703. 32:20>> Yes.
  704. 32:21>> For the process reward uh is this a
  705. 32:24reward that's being computed in
  706. 32:26practice? I don't know what the research
  707. 32:28is like per token that is being done or
  708. 32:32maybe like blocks of tokens and then
  709. 32:34it's being computed.
  710. 32:34>> Yeah, it's not per token. is per like
  711. 32:37step like imagine and this is something
  712. 32:40we're going to learn about in future
  713. 32:41lectures. Imagine these are like a math
  714. 32:44problem and then there are steps to
  715. 32:46answer that like in one way to do it is
  716. 32:49to have humans annotate the quality of
  717. 32:51each step like yes or no this is good or
  718. 32:53bad and then training the model based on
  719. 32:56each step which could be like you can
  720. 32:58assume it's like one kind of
  721. 33:01intellectually meaningful chunk of the
  722. 33:04result or it could be you can define it
  723. 33:06as a sentence and so on.
  724. 33:14And of course um as it's intuitive as
  725. 33:18it's very intuitive if you combine the
  726. 33:20two of outcomebased reward model and
  727. 33:23parallel best of end and sequential
  728. 33:25revisions you get better results. this
  729. 33:27field is still there's a lot of unknown
  730. 33:30kind of uh questions around this and but
  731. 33:35combining the two for example one simple
  732. 33:37way to kind combine that is um instead
  733. 33:40of one parallel one sample and revisions
  734. 33:42you do two and and you use your um and
  735. 33:47you get to two final answers and then
  736. 33:49you use um
  737. 33:52the best one either using your PRM or OM
  738. 33:55to select how the two the two are, but
  739. 33:58you're augmenting each parallel sample
  740. 34:00with these sequential revisions and you
  741. 34:02can use a PRM to guide that search for
  742. 34:04each parallel for each sequential
  743. 34:06revision. Um, something that's
  744. 34:09interesting is that the PRM
  745. 34:12there are many off-the-shelf PRMs that
  746. 34:14you can use for your task. So you can go
  747. 34:17and say take a pre-trained PRM and use
  748. 34:19that to guide the search for your own
  749. 34:21task and you can potentially find a PRM
  750. 34:24that is most kind of relevant to the
  751. 34:27type of task that you're doing and you
  752. 34:28want to do test time scaling on or you
  753. 34:31can train your own PRM and and OM based
  754. 34:34on your own data as well.
  755. 34:39Um so this paper looked into the math
  756. 34:43data set and uh something like 12k train
  757. 34:46set 500 test questions um used a palm
  758. 34:50model. And what was interesting here is
  759. 34:53that they defined a notion of difficulty
  760. 34:56uh for compute opt uh for for measuring
  761. 35:00these different scaling behaviors and
  762. 35:02for that they looked into the pass at
  763. 35:04one performance of the model on each
  764. 35:06problem.
  765. 35:08Um and and by just measuring that they
  766. 35:11define okay these are the problems that
  767. 35:12are hard. These are the problems based
  768. 35:15on like how many of the generated
  769. 35:17answers are correct across a body of a
  770. 35:19number of samples. They had like
  771. 35:21different like five different bins for
  772. 35:24the complexity of the problem and they
  773. 35:26did that as we see to kind of get some
  774. 35:28conclusion about what test time scaling
  775. 35:31works better for harder or easier task.
  776. 35:36um they also train their own process
  777. 35:38reward model and even they fine-tune a
  778. 35:41model for creating these revisions. But
  779. 35:44right now the models every model that we
  780. 35:46use pretty much it's capable it's just
  781. 35:48as long as it's instruction tuned is
  782. 35:50capable of doing revisions if you prompt
  783. 35:53the model to do so ask the model to do
  784. 35:56so. Um and there are some interesting
  785. 35:59observations here. Uh for example, here
  786. 36:02is the majority voting for these
  787. 36:04problems. The accuracy as the generation
  788. 36:07budget increases. And then this is the
  789. 36:10the the purple one is the OM one. Um and
  790. 36:14the green one is the
  791. 36:18um PRM one and then the blue one if you
  792. 36:21really try to optimize different ways of
  793. 36:24mixing and matching things. Um and this
  794. 36:28is this area is the one that still is
  795. 36:30unopen research like how do we do that?
  796. 36:33How do we go about mixing and matching
  797. 36:35revisions and uh parallel scaling uh to
  798. 36:39optimize the test time scaling because
  799. 36:41at the end of the day we want for each
  800. 36:44uh accuracy we want the minimum
  801. 36:46generation budget to hit that accuracy.
  802. 36:49Um and in in a few slides ahead we talk
  803. 36:52about one method to optimize this um
  804. 36:55scaling and budget um performance per
  805. 36:58budget. Um they also looked into these
  806. 37:01different bins of difficulty. So number
  807. 37:03five is the most difficult questions
  808. 37:06because the accuracy is the lowest and
  809. 37:08number one and then here on the right
  810. 37:10there the these colors is the sequential
  811. 37:14to parallel ratio. And while they were
  812. 37:17saying that okay in the easier for the
  813. 37:19easier problems it seems like this
  814. 37:22darkest kind of the darkest purple color
  815. 37:26achieves highest accuracy and that's
  816. 37:28where we have a lot more sequential kind
  817. 37:32of tokens compared to parallel when the
  818. 37:35problems are more difficult and to some
  819. 37:37extent those are some of the more
  820. 37:38interesting problems. This optimality is
  821. 37:41kind of harder to say. It's harder to
  822. 37:43say whether it's sequential or uh the
  823. 37:45the ratio changes even from bucket four
  824. 37:49to bucket five on how you how you should
  825. 37:52allocate that.
  826. 37:56Um another uh observation from this
  827. 37:59paper was that um and this is a still
  828. 38:03work in progress and I believe still the
  829. 38:06true the true observation as of today is
  830. 38:08that for easy and medium questions it
  831. 38:12seems like additional test time compute
  832. 38:15can be more favorable than scaling
  833. 38:18pre-training of the model.
  834. 38:21So here we have these two like the easy
  835. 38:24are the green medium is blue and orange
  836. 38:29uh is the hard questions. It seems like
  837. 38:31if we look into the ratio of inference
  838. 38:34tokens to pre-training tokens uh it's
  839. 38:37positive uh uh here but as we get to uh
  840. 38:44it's positive for the uh easy and medium
  841. 38:46problem but for the hardest problem it
  842. 38:49seems like larger models like a more
  843. 38:52pre-training or larger models still do
  844. 38:54better if you are from a from a tokens
  845. 38:59optimized perspective.
  846. 39:00And this is something that we we we have
  847. 39:03seen in many of our research in the lab
  848. 39:06and or around the lab as well. Um it
  849. 39:09seems like like models simpler like open
  850. 39:13source models or smaller models are
  851. 39:15becoming more and more useful as we take
  852. 39:18more test time compute apply more test
  853. 39:20time compute on them. But still for the
  854. 39:23very very hard problem still the
  855. 39:25frontier models which presumably use
  856. 39:27more pre-training and they're larger
  857. 39:30they do better uh even if we had a whole
  858. 39:34lot like infinite budget for test time
  859. 39:36scaling. Of course we don't have
  860. 39:37infinite budget but any reasonably large
  861. 39:40test time scale. Yes. Um, in this case,
  862. 39:43how are you?
  863. 39:46Does it seem like for inverse use it
  864. 39:48once like pressure tokens, it's like use
  865. 39:53it once and you can use it.
  866. 39:54>> Yes, that that is that is true. But in
  867. 39:57general from a but this is a still so
  868. 40:00basically yes in pre-training is done
  869. 40:03once but scaling is every time right
  870. 40:07every time we run the model but but
  871. 40:09still um
  872. 40:15so so so but still this is an
  873. 40:18interesting observation from the
  874. 40:20perspective of are we done doing
  875. 40:23pre-training because we can just keep
  876. 40:26sampling from the models we have or no
  877. 40:29pre-training is still helpful and we
  878. 40:32should do more and more right um not
  879. 40:35everyone can pre-train a large model
  880. 40:38right so even if pre-training was an
  881. 40:40option for u achieving was better than
  882. 40:44test time scaling in any scale not
  883. 40:46everyone can do that because it's a very
  884. 40:48expensive process so this is very
  885. 40:50interesting that for many problems we
  886. 40:53can do test time scaling even if it's we
  887. 40:55do every time for a new problem because
  888. 40:58that's feasible. But also on the other
  889. 41:00hand, for the hardest problems, we still
  890. 41:03need to do pre-training and better
  891. 41:04models still do better,
  892. 41:06>> right? Um that makes sense. I was just
  893. 41:08curious like precisely like in the
  894. 41:10middle graph when it says like the ratio
  895. 41:12is one of the difference to that or like
  896. 41:17what
  897. 41:19there's also one is used for a single
  898. 41:22task.
  899. 41:23>> No, no, it's not it's not exactly that.
  900. 41:25It's more like some some ratio of
  901. 41:27pre-training to inference compute. It's
  902. 41:29not a one to one because it doesn't make
  903. 41:31sense in that case, right?
  904. 41:34>> For the hard questions part, why is it
  905. 41:36that larger models still better?
  906. 41:39So, can can you take a smaller model and
  907. 41:41yet make it an expert on hard questions?
  908. 41:45Yeah, you can always like fine-tune a
  909. 41:47model
  910. 41:48to become better on a certain set of
  911. 41:52questions, but we are talking about a
  912. 41:54more general perspective of like let's
  913. 41:57have a whole lot of data that's like
  914. 41:59general, not specific to a specific task
  915. 42:03and just like compare like the the
  916. 42:07common recipes that you use for training
  917. 42:09models. Let's just follow that and then
  918. 42:12see how much they do better at test
  919. 42:14time. Um
  920. 42:22any other questions?
  921. 42:25Okay. Um so here are maybe we discussed
  922. 42:28some of these already but here are some
  923. 42:32more questions that I give you another
  924. 42:34two minutes. Let me check the time. And
  925. 42:36yes, we do have time um to think about
  926. 42:41this. I think this helps you kind of
  927. 42:42like uh absorb some of the the topics
  928. 42:45that we that we learned uh or uh heard
  929. 42:49about in the previous slides and then we
  930. 42:51discuss them in 2 minutes.
  931. 42:56Okay. Should we should we start? Anyone
  932. 42:59wants to add any comments here or any
  933. 43:03questions you might have?
  934. 43:06Yes.
  935. 43:06>> Um, so do you try sequential and you try
  936. 43:10curl? What about tree search? And in
  937. 43:13that case, like you're kind of doing
  938. 43:16>> you're mixing the both.
  939. 43:17>> Yeah. You're kind of mixing, right?
  940. 43:19>> Yeah. There's no universal answer that
  941. 43:21can be there. But the general sentiment
  942. 43:23was that that does better like some sort
  943. 43:26of combining the two
  944. 43:28>> than doing like you do some kind of like
  945. 43:30cleaning and like reduce a lot of the
  946. 43:32confuse that you're doing, right? or
  947. 43:34like reuse control that you're doing
  948. 43:36because it's a tree like yes
  949. 43:39[clears throat]
  950. 43:39>> that is when we discuss the beam search
  951. 43:41stuff and the PRM like bringing a PRM to
  952. 43:45kind of cut the uh tree at it at each
  953. 43:49level and explore only the more uh
  954. 43:52promising branches.
  955. 43:57>> Anything else? Yes,
  956. 43:59>> we have discussion with it for example
  957. 44:02point for you was thinking that
  958. 44:05bigger problem the more paths you have
  959. 44:07towards the success of solving it
  960. 44:09therefore you require it could be more
  961. 44:11sequential while with harder problems
  962. 44:14you would there's few paths to solving
  963. 44:16that you would need many paralle to find
  964. 44:19at least one viable solution and we
  965. 44:22started thinking a bit also why could
  966. 44:24you do this in a chain of thoughts kind
  967. 44:26of way where you are doing your chain
  968. 44:28fault but verifying throughout the steps
  969. 44:30in the uniforms is that pruning and
  970. 44:33these branches that are violating
  971. 44:35anything.
  972. 44:37>> Yeah. So in terms of sequential you're
  973. 44:40saying that for easier ones easier
  974. 44:43problems the for harder problems you
  975. 44:45mean you need more exploration
  976. 44:47potentially for easier
  977. 44:49>> to the correct answer. Well, for easier
  978. 44:52problems
  979. 44:54um because like any kind of path might
  980. 44:58lead us to the correct answer. We might
  981. 45:00not need to explore different parallel
  982. 45:02solutions. Yeah, that is an intuitive
  983. 45:05kind of way of thinking about this.
  984. 45:10Any other thoughts?
  985. 45:18Um in general this is a very interesting
  986. 45:21appro kind of problem to think about how
  987. 45:24do you how do let's assume that this
  988. 45:26tokens that you generate is like a knob
  989. 45:28that you have to increase problem the
  990. 45:30quality of the responses how do you
  991. 45:32allocate this knob and how do you elicit
  992. 45:35these uh generations from the model so
  993. 45:38let's think about like in the following
  994. 45:40I'm going to talk about one way to do to
  995. 45:42optimize these kind of test time scale
  996. 45:45scaling to generate optimized answers
  997. 45:47and that is the archon paper um an
  998. 45:50architecture research framework for
  999. 45:52inference time scaling um uh so the
  1000. 45:55problem state and your TA is uh one of
  1001. 45:58the co-authors of this work so the
  1002. 46:01problem in this paper is that again we
  1003. 46:03are interesting interested to see um how
  1004. 46:06we can mix and match different inference
  1005. 46:08time scaling methods to build a kind of
  1006. 46:10optimize the frontier of uh capability
  1007. 46:14or correctness versus cost. Um
  1008. 46:18and and and the the other thing that um
  1009. 46:23again all of these questions basically
  1010. 46:25saying the same thing that how how we
  1011. 46:27can optimize assigning in press compute
  1012. 46:30two different task um and basically
  1013. 46:33design mechanisms that gets us to the
  1014. 46:36high quality answers while not wasting
  1015. 46:38too many tokens and generations.
  1016. 46:43So here is the RQ like in this case we
  1017. 46:47thought of inference scaling in this uh
  1018. 46:49project as like an inference
  1019. 46:52architecture design problem. Um so here
  1020. 46:57is how this uh the frame archive
  1021. 46:59framework works on the input side we had
  1022. 47:02a set of target benchmarks that we
  1023. 47:04wanted to get good good results on these
  1024. 47:06benchmarks. So these are the benchmarks
  1025. 47:07we are optimizing for. There's an
  1026. 47:09inference called budget and then there's
  1027. 47:12also a set of available LLMs because we
  1028. 47:15can always mix and match different
  1029. 47:17models also to get to and to a correct
  1030. 47:20answer for a input question. And then we
  1031. 47:23have a set of inference time techniques
  1032. 47:25which I'm going to describe in the in
  1033. 47:27the following slides. And then we have
  1034. 47:30we designed this optimizer
  1035. 47:33uh it's called itas. It's inference time
  1036. 47:36architecture search that basically tells
  1037. 47:39us how to put together these different
  1038. 47:42models and different inference time
  1039. 47:44techniques together whether it's
  1040. 47:46parallel sampling sequential and all
  1041. 47:48that in order to uh get high quality
  1042. 47:52results given the budget the inference
  1043. 47:54call budget that we have. how to
  1044. 47:56optimize the quality of results based on
  1045. 47:59that and then the output is this
  1046. 48:01architecture that mixes and matches
  1047. 48:03these different techniques and models
  1048. 48:05together.
  1049. 48:07Um so let's take a look at different
  1050. 48:10inference time operations. So first we
  1051. 48:14have the gen we called it the generation
  1052. 48:16but this is basically um
  1053. 48:19the
  1054. 48:21the just sampling from the model and
  1055. 48:24this can be part of the repeated
  1056. 48:27sampling approach right so if we
  1057. 48:29generate n we use n generations at a
  1058. 48:33time that means we have generated n
  1059. 48:35different responses to our input
  1060. 48:37question so that's one one type of
  1061. 48:39inference time scaling another one is
  1062. 48:42fusion which is surprisingly a very
  1063. 48:45effective method. So fusion is let's say
  1064. 48:48we have k um k different responses
  1065. 48:53and we want to generate one output
  1066. 48:55response out of these k um fusion takes
  1067. 48:59an llm and asks an llm the same exact
  1068. 49:05question that I just said basically it
  1069. 49:07says here's the input question here are
  1070. 49:10k different responses to this input
  1071. 49:12question given all of this generate or
  1072. 49:15synthes ize one output response for the
  1073. 49:20input question. Basically, we are
  1074. 49:22showing all of the K generations to the
  1075. 49:25model such that the the LLM can generate
  1076. 49:28an output answer while being aware of
  1077. 49:31all the possible ways that uh this
  1078. 49:34question is answered.
  1079. 49:37Um and this is kind of it goes under the
  1080. 49:41C category of sequential update, right?
  1081. 49:44we have this parallel samples but then
  1082. 49:46we are kind of fusing them into one
  1083. 49:48answer. Then there is the um um critic
  1084. 49:53which
  1085. 49:55basically for any given response we can
  1086. 49:58ask a model to um
  1087. 50:01generate or describe the weaknesses or
  1088. 50:04strengths of these response and that
  1089. 50:07could be one kind of inference scaling
  1090. 50:09action. Um and then we have the ranker.
  1091. 50:14This is again these are all prompting
  1092. 50:16based optimization for the model. We
  1093. 50:17don't have we haven't trained the model
  1094. 50:19to do this specific test time scaling
  1095. 50:22task. We just ask the model in the
  1096. 50:24instruction prompt that um can you rank
  1097. 50:28these generated responses from the
  1098. 50:30previous step um based on the their
  1099. 50:33quality.
  1100. 50:35Um
  1101. 50:38and then the vifiers generates the
  1102. 50:40returns the response with while also
  1103. 50:43talking about the reasoning of how why
  1104. 50:45it came came to this um kind of way to
  1105. 50:49score a certain answer. Um I'll get to
  1106. 50:53the next two uh unit test generation and
  1107. 50:56evaluation in a bit but just to show you
  1108. 50:58how effective these different uh
  1109. 51:01inference time scaling techniques are
  1110. 51:03let's take a look at this win win win
  1111. 51:05rate um
  1112. 51:09um for
  1113. 51:13what task we don't have the task here
  1114. 51:15but it's one of the task of like uh one
  1115. 51:18of these benchmarks that I don't I don't
  1116. 51:21know if you remember the task.
  1117. 51:23>> Yeah. Um, so it's some some pro question
  1118. 51:28answering reasoning benchmark. So here
  1119. 51:31let's take a look at how these things
  1120. 51:33work. So uh first we have let's say we
  1121. 51:37have a number of repeated samples from
  1122. 51:40the model. Uh it goes from 1 to 10 on
  1123. 51:43the left side. Let's focus on the graph
  1124. 51:45on the left side. And then the orange
  1125. 51:48one is the kind of worst possible way of
  1126. 51:51approaching. We just randomly select one
  1127. 51:54and look at the quality and the
  1128. 51:56correctness of this response. Um the
  1129. 52:00green one is when we use the model to
  1130. 52:03rank them to rank the responses and we
  1131. 52:06select the top one ranked by the model
  1132. 52:09and and report that that already does
  1133. 52:11better than uh [clears throat] that
  1134. 52:13already does better than the the orange
  1135. 52:15one.
  1136. 52:16The blue one is um oracle selection
  1137. 52:20meaning let's assume we are not mixing
  1138. 52:23these responses in any way. We we just
  1139. 52:27select the best one generated.
  1140. 52:30Let's say we have an Oracle verifier
  1141. 52:32that can tell us which one of these is
  1142. 52:33correct. And that obviously does better
  1143. 52:36than just asking the model to rank them
  1144. 52:38because it's an Oracle verifier. And
  1145. 52:41then we get to the red one which is
  1146. 52:44where we when we use the fusion. So
  1147. 52:47basically for each each point here let's
  1148. 52:49say we are at five. Uh the red data
  1149. 52:52point is basically we have given these
  1150. 52:55five responses to the model and asked
  1151. 52:57the model to synthesize one answer one
  1152. 53:00final answer given all this information.
  1153. 53:03And it's so interesting and this
  1154. 53:05paradigm is so powerful that that can on
  1155. 53:08its own improve the quality of responses
  1156. 53:11over oracle selection.
  1157. 53:14Um and then finally the purple one is
  1158. 53:17where we um
  1159. 53:20instead of fusing
  1160. 53:23um all the uh all the all the responses
  1161. 53:27we first selected the top five
  1162. 53:30um in the and and then and then we went
  1163. 53:33about fusing them. So it seems like some
  1164. 53:35sort of a filtering of the two does
  1165. 53:38better.
  1166. 53:41Now on the right side we are doing a
  1167. 53:43different experiment and that is we are
  1168. 53:46um on the left side we had only one
  1169. 53:48model generating everything. On the left
  1170. 53:51side we had we were using we we were
  1171. 53:53adding models. So first one is just one
  1172. 53:56model generating one answer. Two the
  1173. 53:58baseline is two different models
  1174. 54:00generating one answer and 10 is 10
  1175. 54:02different models each generating one
  1176. 54:04answer. And we see that of course the
  1177. 54:06random result um becomes worse because
  1178. 54:10the model we looked on the left was I
  1179. 54:13think it was among the better models in
  1180. 54:15this ensemble. But we still see the same
  1181. 54:19trend trend even if these responses are
  1182. 54:22coming from different models like
  1183. 54:24basically the same trend of how these uh
  1184. 54:27all follow each other. Yes. Which model
  1185. 54:31is like using if you're using like 10
  1186. 54:33different models you're asking like
  1187. 54:35somebody else to rank or fuse your
  1188. 54:38>> uh I think it's the model number one in
  1189. 54:40this case the same the model that was in
  1190. 54:42all of those and this was uh kind of the
  1191. 54:45way we created the ensemble was first
  1192. 54:47with the best model and then added the
  1193. 54:48second best model and so on.
  1194. 54:56Okay. Now let's take a look at a couple
  1195. 54:58other inference time techniques and that
  1196. 55:01is unit test generation and evaluation.
  1197. 55:04I think one of you was were were
  1198. 55:06mentioning something like this earlier
  1199. 55:09as well that where we can ask the model
  1200. 55:12to generate these unit tests say when it
  1201. 55:14gets to coding task or math optim math
  1202. 55:17problem solving or other reasoning task
  1203. 55:20tasks. Um, and the unit test evaluation
  1204. 55:23is even crazier. Like instead of like
  1205. 55:26running the unit test, you're asking the
  1206. 55:28model to evaluate a generated answer uh
  1207. 55:32against a unit test.
  1208. 55:36For example, um here is a prompt uh
  1209. 55:40check for so the coding problem in this
  1210. 55:43case is check for balancness of round
  1211. 55:46brackets in an input string. That that's
  1212. 55:48a coding question. And then here is an
  1213. 55:50example input. Here is the type of unit
  1214. 55:53test that the model could generate. Um
  1215. 55:56for example, given a string with an odd
  1216. 55:58number of brackets, the solution should
  1217. 56:00output no, which is like a good unit
  1218. 56:03test in this case. Uh another one is
  1219. 56:05when a closing bracket is encountered,
  1220. 56:08it must match the most recently open
  1221. 56:10brackets that hasn't been matched yet.
  1222. 56:12That's another kind of reasonable unit
  1223. 56:15test. And then you can ask the model to
  1224. 56:17actually generate the code to test this
  1225. 56:19as well. Um, now let's take a look at
  1226. 56:22the types. I don't know if you guys see
  1227. 56:24this well, but the type, but this is so
  1228. 56:25big there's no way for me to put it here
  1229. 56:28with like large font. But this is the
  1230. 56:31type of architectures that aron found.
  1231. 56:34So basically now think about it this
  1232. 56:37way. we have different ways of mixing
  1233. 56:39and matching models and inference time
  1234. 56:41techniques and we can define these
  1235. 56:43layers of optimization. Uh for example,
  1236. 56:46the first layer in this case is
  1237. 56:48generation and then these generations
  1238. 56:50are from different models in this case
  1239. 56:52and then we have a a critic and a
  1240. 56:55ranker. So basically the critique will
  1241. 56:58criticize these generations and then we
  1242. 57:01rank them and then we the optimizer
  1243. 57:04found that we could have a bunch of
  1244. 57:06fusers at this point like each fuses
  1245. 57:08these gener these responses into one
  1246. 57:12output um and then we can go from there
  1247. 57:16um continue this critique ranker. And
  1248. 57:19this was like a rather complicated
  1249. 57:20architecture. And the way that we
  1250. 57:23optimized this architecture is that uh
  1251. 57:26we did some kind of pre-processing to
  1252. 57:28reduce the space of uh optimization. For
  1253. 57:32example, the fact that we found this uh
  1254. 57:35sequence of generation, critique, ranker
  1255. 57:37and fuser do really well. We did that
  1256. 57:40offline. So we limited the search space
  1257. 57:43just because doing this search is very
  1258. 57:45expensive. We need to run a lot of
  1259. 57:47inference calls. But then the way we
  1260. 57:49optimize it that we had a held out data
  1261. 57:51set that we could we had a training data
  1262. 57:54set that we could optimize against that
  1263. 57:57and create this accuracy versus the
  1264. 58:00number of calls that we are making to
  1265. 58:02these models kind of as a as a metric
  1266. 58:05that we are optimizing against. We want
  1267. 58:07to maximize accuracy and min for any
  1268. 58:10given um budget inference budget that we
  1269. 58:14have.
  1270. 58:16Um and this is for one some of the
  1271. 58:18coding problems. This was an optimized
  1272. 58:20architecture. Basically we generate a
  1273. 58:22ton of samples. Uh we generate unit
  1274. 58:25tests and then we evaluate them.
  1275. 58:28Now
  1276. 58:29um
  1277. 58:31an interesting property here is that
  1278. 58:35we found that stacking more and more
  1279. 58:38layers of these inference time
  1280. 58:39techniques or making it deep in a way
  1281. 58:42actually does help with our
  1282. 58:45um accuracy.
  1283. 58:47Um in this case for example the
  1284. 58:51rightmost pink uh graph is uh where we
  1285. 58:54have uh where we have an ensemble
  1286. 58:56meaning we have different models in our
  1287. 58:58loop and we have three layers of
  1288. 59:00critique critiques and fusers and a
  1289. 59:03final fuser fuser layer. Um and this is
  1290. 59:06like significantly better across many of
  1291. 59:08these tasks over both just using a
  1292. 59:12simple the best model only once or the
  1293. 59:16best model eight times with like one
  1294. 59:18layer of fusion. So it seems like these
  1295. 59:20additional layers that we are adding
  1296. 59:23here is actually just like in deep
  1297. 59:25learning we are adding layers and
  1298. 59:26pre-training and the model gets better.
  1299. 59:28Seems like these careful kind of
  1300. 59:30addition of these inference layers are
  1301. 59:32helping the model become more and more
  1302. 59:34accurate. across many of the tasks. Um
  1303. 59:39this is true. And so now the optimizer
  1304. 59:42itself, we used an Beijian optimizer
  1305. 59:46again to simplify the search space. We
  1306. 59:48did a few things. Um for example, we
  1307. 59:51limited the optimizer to only use one
  1308. 59:54inference time technique per layer. Um
  1309. 59:57and the first layer was always just the
  1310. 59:59generator. And then we had this cascade
  1311. 1:00:02of ranker, critic, verifier.
  1312. 1:00:05Uh they they could go anywhere, but we
  1313. 1:00:08we made certain kind of modifications to
  1314. 1:00:11the search search space. For example, a
  1315. 1:00:13critic should go before a ranker or a
  1316. 1:00:16fuser always because we did some testing
  1317. 1:00:19locally and saw this is a better choice.
  1318. 1:00:22Um and then a unit test generator must
  1319. 1:00:24be followed by an evaluator op. Um and
  1320. 1:00:28uh we again we use a Beijan optimizer to
  1321. 1:00:31do this. Um this is often a very
  1322. 1:00:34powerful um method methodology
  1323. 1:00:37um uh a a ton of like good open-source
  1324. 1:00:41software to do Beijan optimization for
  1325. 1:00:43you. Basically you have this search
  1326. 1:00:45space that you want to configure it with
  1327. 1:00:47different uh different kind of uh
  1328. 1:00:50choices for the architecture and the
  1329. 1:00:52output side you have the accuracy and
  1330. 1:00:53you want to optimize for that. Um and
  1331. 1:00:56this does better than greedy search or
  1332. 1:00:58random selection. We are much more
  1333. 1:01:00sample efficient in terms of number of
  1334. 1:01:02configurations that aron searches until
  1335. 1:01:05it reaches a final kind of architecture
  1336. 1:01:09and we can define different objectives
  1337. 1:01:11for it. For example, um available models
  1338. 1:01:15uh inference time inference call budget
  1339. 1:01:17is are one of them are are some of them.
  1340. 1:01:20Um the thing that I want you to uh pay
  1341. 1:01:24attention to in this graph is that this
  1342. 1:01:27interesting property that archon is at
  1343. 1:01:29the end generating one response at the
  1344. 1:01:31very end right so it's like you're
  1345. 1:01:33optimizing pass at one at the very end
  1346. 1:01:36and what was interesting here is that u
  1347. 1:01:40while using just the open-source models
  1348. 1:01:44we could match or exceed um these closed
  1349. 1:01:49source models at the time uh the
  1350. 1:01:51frontier co source model at the time by
  1351. 1:01:54a large mar mar mar mar mar mar mar mar
  1352. 1:01:55mar mar mar mar mar mar mar mar mar mar
  1353. 1:01:55mar mar mar mar mar mar mar mar mar mar
  1354. 1:01:55mar mar mar mar mar mar mar mar mar mar
  1355. 1:01:55mar mar margin across many of these task
  1356. 1:01:58in terms of pass at one here's the
  1357. 1:02:00average pass at one improvement and not
  1358. 1:02:02only that we we could train archon to be
  1359. 1:02:05task specific so when we are doing the
  1360. 1:02:08Beijan optimizing we only look into a
  1361. 1:02:11certain task and we test on that or we
  1362. 1:02:15could train archon to be general purpose
  1363. 1:02:17so we wanted it to do whether bad good
  1364. 1:02:20across many to do well across many tasks
  1365. 1:02:23and even that the general purpose one
  1366. 1:02:25does really really well and better than
  1367. 1:02:27the the frontier models across these
  1368. 1:02:31task and that was like a very
  1369. 1:02:32interesting observation
  1370. 1:02:35um that you can design these inference
  1371. 1:02:37time architectures that do well beyond
  1372. 1:02:39the task or uh the limited task that
  1373. 1:02:43they're trained of. So on average in
  1374. 1:02:45this case we were outperforming GPT40 or
  1375. 1:02:48COD 3.5 sonnet in pass one uh by an
  1376. 1:02:52average of 14.1%
  1377. 1:02:54across these uh instruction following
  1378. 1:02:57reasoning and math and coding problems.
  1379. 1:03:00Uh here are some questions but um that I
  1380. 1:03:04want you to think think about but since
  1381. 1:03:06we're out of time um hopefully you think
  1382. 1:03:09about it uh yourself and
  1383. 1:03:12hope you have a happy weekend.

About this transcript

This page contains the full transcript of YouTube transcript (-Ggc37xLj_Y) , generated from the public captions YouTube serves with the video. The transcript has 9,464 words across 1,383 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.