Everyone, thanks for joining. I'm Charles and I'm a research scientist at Snorkel AI.
And today I'm going to be talking about how we got a 4 billion parameter model to outsmart its 235 billion parameter variant. And this is a specific result in a simulated financial environment. But I think there are general takeaways that I want to make sure are taken home. And the first is for enterprise AI workloads, reliability and specialization can actually outweigh raw parameter scale. And this is possible with high quality data that actually represents the domain and task distribution that you're targeting. And this can result in smaller models that can achieve parity with Frontier models at just a fraction of the cost.
So before I get to it, I'm going to take this opportunity to introduce ourselves a little bit. This is our team. We're a Frontier AI data lab. And our team has founders from labs at University of Washington, Wisconsin, Stanford, and an internal team of really talented FTEs and researchers. And we're in a fortunate position to play, and by that I mean build and deploy data sets and environments for Frontier AI. And that's at the intersection of academia and industry research, but also grounded in enterprise deployments. And this is all to say that we have a team that's built to focus on building the best data possible to define and advance AI.
And the way we do this is threefold. First is open research and benchmarks. So we're constantly contributing to open source benchmarking. And the project I'll be talking about today actually falls under this pillar. But I also want to acknowledge Frontier Lab data and environments as well as enterprise deployments are the things we work on. And under open research and benchmarks, we support research through grants. And I'll talk about opportunities here at the end of this talk. So get ready for that. And then co-authoring with academic or industry partners and leading independent research and publishing open artifacts.
So what I'm talking about today is a partnership with UC Berkeley Sky Computing Lab. And we built, as I said, a 4 billion parameter QLWEN model to outperform its 235 billion model variant on financial tasks. We saw the 4 billion parameter model, spoiler alert, achieve almost a 60% pass at run while the 235 billion model achieved 51%. So exciting results. And this is all in collaboration with, I've got to give credit to, Manan Rugta and Xu Jun Tan from the Sky Computing Lab, as well as Bavishia and Chris Glaze and myself from Snorkel. And you can find all the assets, the training scripts, synthetic data on our GitHub. So check those out.
And this is all open source and available to you. So I'll cover today what we see financial institutions need from AI. And this is from our enterprise deployments learnings, as well as the FinQA open source benchmark. And this is expert validated financial question answering data that we trained and evaluated our model on. And finally, the training process for the RLLM FinQA 4B model. So let's get started. This is the one and only slide with the Charles Dickens reference, I promise. But this is a tale of two models, I'd say. First, the large generalist versus small specialist.
And the point is here, when financial institutions ask us how well does the model or the agent reason, what they typically mean is can it operate in my stack of complex schemas, legacy APIs, and tech debt. And can we trust it in realistic and long workflows without compounding errors? And can we reliably audit the agent? That's important in financial and legal domains, for example. Which brings us to the question, how can we evaluate and improve agents to make them reliable in these real world environments? So the reflex may be to scale. We've all seen scaling law results.
But today I'm going to argue that specialized workflows don't actually need generalists. We don't need polymaths. You wouldn't call Terence Tao for a tax audit if you're lucky enough to have them in your contacts. You'd call the specialist that knows the forms, the tools, and the rules. So that's why we built FinQA. This is expert validated financial question answering data. And I'll walk through the multi-stage pipeline of how we built this benchmark and training data. So first is schema and data extraction. This is coming from 10K reports. These are annual reports required by the SEC for all public companies.
And they're used by analysts for identifying risks and informing investment decisions. We pulled these from the EDGAR system and used the Qwen 32 billion model to produce tables, SQL tables, approximately 6,900 of those. And we used each table to generate a single question-answer pair. And this is produced along with the question taxonomy that was developed with financial experts that work with these documents. And these are used as context for the model to generate a question-and-answer pair along with metadata. That will see what that's used for later. And finally, the third step is verification. And this is a three-layer verification process.
The first is programmatic consistency checks. That's where we use the metadata, which includes lineage and table names and columns to make sure we're not hallucinating those. The second is automated reviews from independent agents. And finally, expert manual review. So humans actually going through these and making sure the questions and answers are realistic and verified. And the outcome is Snorkel's FinQA data. And this is our first pass at this.
Realistic queries requiring planning, tool use, tool calling, and reasoning. And answers are single, verifiable, final answers. And from this, we get from the original set of roughly 7,000 tables, 4,000 in train, 500 in val, and 290 in the held-out benchmark. And the data is split so that no company in the benchmark overlaps in any split. And on this data, we identified, even with Frontier models, reoccurring discipline gaps and failure modes. And the first is schema hallucination. So a model will actually assume that tables exist, column names exist, and this can be an artifact of pre-training data, something that it's seen in its past.
The next is context flooding, so actually flooding its own context with poorly planned queries. For example, just calling select star, and this could overwhelm its context limits if it's successful. And finally, poor recovery from errors. So Qwen 235 would actually repeat the same failed strategy instead of considering the error messages and adapting. And these failure modes are not actually just seen in the financial environment that I'm talking about today, but also what we saw in insurance underwriting. And this is work that I'm calling out that was presented at the CAIS conference a few weeks ago. So now I'll get into actually training the RLLM FinQA 4 billion model.
For this we used the RLLM framework, and this was developed by our Sky Computing Lab collaborators. And if you haven't used this yet, this is a really user-friendly tool, and a few core features I want to call out is it really works with any agent framework, requires near-zero code changes just using a decorator pattern. CLI first workflow and battle-tested results. So we've seen RLLM actually improve not just on this finance case study, but also in math reasoning, for example. Multiple RL algorithms are built in. GRPO, reinforce RL, OO, for example. And you can customize those and then supports multiple training backends. All right. Now for our training environment.
This is the training environment we use for our model. The agent runs in a ReAct loop and has access to tools to interact with the tables we generated. The environment includes the roughly 7,000 tables we created. And finally, reward is binary correctness determined by a language model as judge, in this case, GPT-4 nano using reference-based evaluation. Training details are listed here. This is what would be interesting to folks. We have the Qwen 4 billion model as our base model. GRPO and binary reward for optimization. And the RLLM framework, we ran roughly 1,000 concurrent environments to generate trajectories.
And this all was a cost under $500 to get the results that we saw. Broken down between compute, roughly $420 and $40 for a judge, the judge API. And this was on eight H100s. The first result is the central question. Can a 4 billion model, armed with the specialized tools and training, actually compete with its larger variant? And the answer is yes. So what we saw was the base model's accuracy more than doubled. And it outperforms its larger variant, the 235 billion parameter model. And this is despite being a fraction of the size. And we evaluate all models shown here on the expert curated, held out, 290 samples. And this is the first one that we saw in the world.
So a natural concern is whether this actually transfers to harder problems. So this is just single question-answer pairs on a single table. And to investigate this, we looked at our FinQA reasoning data. So this is a development on the FinQA data I presented earlier. And the difference here is that now we're having dependencies on multiple tables, 2 to 5 tables, and requires sequential decision-making and planning. And we evaluated on this data set. You can see the breakdown as well. We have roughly 1,000 in train, 120 in validation, 80 in benchmarks. And what we see is the tool use discipline actually generalized directly from training on the simple data.
And no explicit training on multi-table examples was needed to see lift in this multi-table variant of the data set. And we'll investigate why with ablation studies. But the next concern we had was whether this result would generalize to more general use cases. So for this, we used the BFCL benchmark. And this measures general tool calling capability. And overall accuracy was actually slightly improved. And then we had also minor gains on multi-turn and memory. So specialization didn't actually erode the model's broader tool use competence when we did RL fine tuning for this model. So to isolate what drove this performance, we ran ablation study on data mixture.
So different ways we can combine the training data we had. The first is just training on FinQA data. And the second, single and multi-table. And finally, a curriculum where we start with single and then move to multi. And surprisingly, just training on the simpler set resulted in the most lift. And this partially explains the generalization result we saw earlier. The bottleneck was never reasoning depth. It was just tool use, meaning the model where it was actually failing and improving the reliability of that. And once you master the fundamentals, it could compose those skills.
So the next natural question is whether more informative reward signals, for example, rewarding intermediate steps, table access, query completeness, things like that, could actually accelerate learning. So this is different from curriculum, for example.
And the most sophisticated variant we came up with was a rubric. And this uses fine-grained scoring with multiple weighted components. And this actually came up with experts. And despite this investment in reward engineering, we actually, again, saw simpler was better. A single binary reward signal was what got us the most lift on this data. Which led us to a blueprint that we've been developing for enterprise agents. And generally, I'd say this study showed us that small models can successfully be trained with RL when you have quality data to represent the target outcomes and tasks. And this can result in better deployment economics for specialized tasks and domains.
And we've seen this and repeated this result in other areas, including healthcare, law, and insurance, which I pointed to earlier. So check that out. And our point of view as far as building axes for evaluating agents is this. Environment complexity is one of the most important axes. How complex, how realistic, and dynamic are the environments the agents operating in? And the next is autonomy horizon. Are agents being tested and evaluated at the lengths, the horizon lengths, and the way people actually want to use agents? Are they making safe and good decisions by themselves? And can they actually improve their judgment as a co-pilot over time?
And finally, output complexity. We want to capture the wide range of outputs in our day-to-day work. And I would say that this is currently underexplored. New benchmarks are coming up in this direction, but still I see a big primary focus on text artifacts. And creating more rigorous evaluations in these settings is a big opportunity. And progress is being made here. So on that note, I'm going to advertise our open benchmarks grants, which funded this project. And this is a multi-million dollar commitment to producing open benchmarks. We've had a lot of success. Agent, last exam, judgment bench, others are coming out.
And this is really accelerating our ability to measure the frontier and shape the frontier. So to apply, check out our website. You'll go through a submission, selection review process, develop, and then finally publication, launch, and promotion. And I also want to call out that we're hiring in professional research, you name it, engineers. And check that out. You can check out our website. And finally, thank you so much for attending. You can use this QR code to see the blog as well as pointers to all the artifacts that released on GitHub and HuggingFace. Thank you all. And finally, thank you so much for attending.
You can use this QR code to see the blog as well as pointers to all the artifacts that released on GitHub, HuggingFace. Yeah. Thank you all. Thank you. Thank you.