Skip to main content

Building AI Models In Health Care Using Semi-Synthetic Data

Summary

  • Semi-synthetic data for ML training: This video explores how Fight Health Insurance created training datasets using de-identified public data and proprietary information while protecting patient privacy.
  • Privacy-preserving model development: Learn techniques for fine-tuning ML models in regulated healthcare using semi-synthetic data, ensuring compliance without sacrificing model quality or inference affordability.
  • Reasoning and efficient inference: Discover how to incorporate advanced reasoning techniques in fine-tuning and optimize models for cost-effective serving on a single GPU instead of expensive GPU clusters.

Building AI Models In Health Care Using Semi-Synthetic Data

Watch: Building AI Models In Health Care Using Semi-Synthetic Data
Talk by Holden Karau, Co-founder, Fight Health Insurance INC
Regulated or restricted fields like Health Care make collecting training data complicated. We all want to do the right thing, but how? This talk will look at how Fight Health Insurance used de-identified public and proprietary information to create a semi-synthetic training set for use in fine-tuning machine learning models to power Fight Paperwork. We'll explore how to incorporate the latest "reasoning" techniques in fine tuning as well as how to make models that you can afford to serve — think single GPU inference instead of a cluster of A100s. In addition to the talk we have the code used in a public GitHub repo — although it is a little rough, so you might want to use it more as a source of inspiration rather than directly forking it.
Databricks Named a Leader in the 2025 Gartner® Magic Quadrant™ for Data Science and Machine Learning Platforms: https://www.databricks.com/blog/databricks-named-leader-2025-gartner-magic-quadrant-data-science-and-machine-learning
Build and deploy quality AI agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements

FAQs

How do I create training data in regulated industries like healthcare?

This video demonstrates how Fight Health Insurance created semi-synthetic training datasets combining de-identified public data with proprietary information. This approach enables effective model training while protecting patient privacy and meeting healthcare regulations.

Can I use semi-synthetic data for fine-tuning models?

Yes, this video shows how semi-synthetic data enables fine-tuning ML models in healthcare without leaking sensitive patient information. The video also covers incorporating advanced reasoning techniques to improve model quality on the Databricks Data and AI platform.

How can I reduce inference costs for deployed models?

Learn techniques for optimizing models to run efficiently on single GPU instances instead of expensive GPU clusters. This video demonstrates how Fight Health Insurance reduced serving costs while maintaining performance for their healthcare ML models.

What legal and privacy considerations should I know?

This video stresses the importance of consulting legal counsel before training on sensitive data. It covers data privacy policies, vendor vetting and best practices for compliance in regulated industries like healthcare on the Databricks Data and AI platform.

Full transcript

So We're talking about building AI models in healthcare. Um, and we're going to be looking at using semiynthetic and actually more than just semiynthetic data. So, also deidentified data and essentially how we can build models in ways where we don't accidentally leak people's personal information, right? Because that's bad. We want to protect people's privacy, but we do want to benefit from usage, right? We want these things to get better.
Uh, but we also have a strong desire to not go to jail. Um, if anyone's like curious, you can play around with the models that I'm going to be talking about at fightalth insurance. com. You can also find some of them on huggingface under the organization. I don't remember if we updated it yet. It's either Totally Legitco or Fight Health Insurance. Um, totally legit code didn't go over very well with the health insurance companies or uh really anyone besides the developers who thought it was hilarious.
Uh, yeah. So, I want to I want to be super clear. This is not legal advice, right? Um, I am not a lawyer in case you can't tell from my fabulous outfit. Um, and if you know lawyers that dress like this, fantastic. Let me know. I want to hire in-house counsel one day. But but really you should talk to your lawyers before you start training on data where consumers have been using it especially in situations where you have sensitive information like PHI.
Um super important and also check with your vendors to make sure that they share the same understanding of data privacy that you do. Um, this is important because there's lots of wonderful great services out there to fine-tune models and most of them if you ask them what their data privacy is will go what now? Um, not all of them. Some of them actually do have great policies and you know your lawyers can hash it out.
Uh, anyways, great. So, uh, there are some things that might not be appealing to everyone in this talk. Um, there's mention of broken bones, there's mentions of like trans stuff, there's mentions of American healthcare. um that can be these can all be triggering. Um and if you ever feel at any point during this talk or really any talk it's like not your vibe just feel free to leave. I won't take it personally. I can't say other speakers won't take it personally but like prioritize your own mental health right computers are fun but you should try and survive um this really rough world that we're in right now.
Um the other thing is I've mostly worked at large companies. Right now obviously tiny startup Fight Health Insurance Incorporated is two people in a garage in San Francisco. Uh but before that you know I've done Amazon, Apple, Netflix, Google. So I'm used to working with these really really large systems. Um the other thing is I'm a Spark and Ray nerd. I have tattoos from these books that I've written uh on my arm in addition to my pronouns in case I ever forget.
It's very important. You know mornings can be a little rough. Uh but essentially there are times when I use tools which objectively are not the right thing to do because they're the tools that I'm familiar with, right? So there's places where I'm going to talk about using Spark for things and you might look at this and be like, why would I use Spark? I can use a Pandanda's data frame. And that's fine, too. Um especially if you go look at the GitHub code, you might be like, wow, this is really weird.
Why is she using Spark to process literally megabytes of data? And the answer is because I've worked on Spark for a decade. Uh, so I'm I'm pretty familiar with it. Cool. So, we're gonna go on a super fun magical journey together. We're going to talk about why this matters. Um, we're going to talk about sort of how to do this and then we're also going to talk about the different approaches to preserving privacy because there's like the approach that I did, but this is not the only approach.
There's many different techniques. And then we're going to put it all together and fine-tune a model. We're going to have all kinds of fun. It's going to be great. If you find yourself zoning out and you're just like, "Oh man, I don't I don't want to get up and leave because like that's effort, but I don't want to pay attention anymore, you can go and play with this." And you can also go and check out the GitHub and start looking at the code.
I know that like I have ADHD, so like multitasking is kind of my jam. I get it. It's pretty great. Um, so yeah. So why am I working on this problem? So I got hit by a car in 2019. That was what one would describe as unpleasant. Um, I spent a week at SF General. fantastic people, really great. But um I would say like as soon as the fentinol wore off, my next question in addition to like am I ever going to be able to walk again is how the hell am I going to pay for this?
Right? And at the time I had relatively good insurance. I was working at Apple. Um it was an Orisa plan, but it was a PO plan, so it didn't super matter that it was out of network, but it was like, wow, I don't know how I'm going to pay for this. And then the bills started coming. Um and thankfully I did navigate it but it was like the old engineering saying right we solve a problem once okay we solve a real problem twice we start thinking maybe I should automate this and by the third time we've already busted out of and spent several years of our lives uh building something of questionable utility and that's that's sort of how this got started.
The other one is I'm also trans. Um and let's just say that being trans in America is an exciting time. Um, but even before our present events, uh, accessing health care as a trans person in America tended to result in more denials than approvals, I would say. And so I got a fair number of denials and I was somewhat used to this, but to a certain extent I was willing to write it off as a like the system is broken for trans people and that sucks.
But like we are a tiny segment of the population and it was only once I had the car crash that I was like, "Oh, this is broken for everyone, not just the people in my community. We should we should really do something about this." Um, and I've already sort of alluded to this, right? like I'm trans, I'm queer, I'm Canadian uh in America. So I've seen other health care systems function. Um so I know that it doesn't have to be this way.
I know we're not going to get the Canadian model, right? We're not going to get universal healthcare probably in my lifetime. That's fine. But there are things we can do to make the American model work better. And I'm also a part of the broader leather community. If you've ever ever been here during the Salesforce conference, it's that other conference that's happening where they're wearing a lot of leather. Um it's fantastic.
I highly recommend checking it out if that's your scene. Um, and this this is important in that yes, it does inform sort of the problem that I'm working on and why I'm working on it. But it also matters because I think for those of us who are working on building machine learning tools, we should look around our team and be like, okay, cool. Did everyone go to? Did everyone like are we all from the same background? And if we are, it's probably time to get some other voices in the room.
Uh, I will admit like fight health insurance, we only have two people, right? So the diversity of voices in the room aren't huge, but you know, you should try and when you have the ability to make sure you've got more than just people who went to in the class of 09 and 2010. Uh, okay, cool. So why why are we doing this? Why do we need to fine-tune our model? So one one possibility is, right, we could just take an off-the-shelf model and try and use it to appeal health insurance denials in America.
And there are some people doing that and they have some amount of success, but it's it's probably not great, right? Um, and there's a bunch of things, right? One is rule-based expert systems, aka the 2010 of AI, is essentially just like we're going to make a whole bunch of if statements, but we're going to call it an expert system, right? And then the problem is that doesn't scale because you have to keep hiring more and more engineers to create more and more if statements.
And this really it turns out that Americans health insurance plan isn't really nicely expressed in even a 100,000 if statements, right? Uh and so this this just doesn't scale, right? Um the other problem with the general purpose models that we can grab off the shelf are that a lot of this data isn't public, right? And this is good, right? Like our health insurance data should not be public, right? And this is this is very reasonable but as such they haven't been fine-tuned on a lot of let's describe it the special reasoning that insurance companies use right because this stuff is not is not readily available.
The other one is by fine-tuning it, we can use smaller models, right? So these giant deepseek models, they are expensive, right? If we try and run inference on these huge huge models, it's super super costly. Um, we also get more control. And the final one is retrieval augmentation only goes so far. And so this is yes, we could take these these general purpose models and we could just feed them insurance documents uh to try and give them the context.
But that requires that we have these insurance uh documents and we don't always have them. Uh how many people here actually have a copy of their health insurance plan document and not the summary plan document but the actual full plan document? We've got two, right? And like I am not one of those people and that's because I currently have insurance through my wife's company and my wife's company doesn't their HR is lovely people but they don't know how to access it.
I've sent the formal written request and the 30 days that they have to respond to it has long since expired. Uh right and they don't actually know how to give us these documents and they also change pretty frequently like formularies change in the middle of the year. Right? And so retrieval augmentation isn't enough. We actually have to infer what's happening by observing the system from the outside. So this is all great.
This tells us why we need to do this. But nowhere does it tell us how to do this. Um, our first problem is sort of the initial data set is hard to come by, right? And that's part of why we do need to fine-tune this. And that's because data about insurance rejections and appeals isn't public. Um, there are some people who post on Reddit and that's great. I love that, but that's like hundreds of examples and we need hundreds of thousands.
Um, information leakage, it's going to be hard and keeping it fresh is also going to be hard. But we're going to tackle these together. So we're going to get started and the first step we need to do is find this data. Now who has this data? The health insurance companies have this data. Uh I have asked them um and I will say the nicest response I got was no. Um and the average response we will not share. Uh but so the insurance companies they have the data.
They're not going to share it with me because it's a semi-adversarial system that we're working in. Doctor's offices do have some of this data. Unfortunately, there's a whole bunch of laws that prevent them from sharing this data. Very reasonably so, right? So, we'd have to sign a BAA with each one of them, and that's going to take a long time. Uh, my lawyers are great, but I don't have enough money to keep paying them to like talk to every single practice.
So, okay, this this seems almost almost insurmountable, but insurance commissioners also have this data, and they might be more aligned with something like this. The problem is that while the insurance commissioners do have this data, it's not quite in the form that we want, right? So, they don't actually have the appeals and the denials, they don't actually have the policy documents, but they have these final decisions, right?
Where something has been appealed to the insurance commissioner. They write, "Hey, this was appealed to us. This is the reasoning that we used to justify our final decision." And so this won't tell us exactly what the insurance company's policies are, but it does give us a good idea about like, okay, cool. If we can make an appeal that has all of these elements in it about this kind of medicine, uh there's a good chance that we can get it approved, even if not by the insurance company, eventually by the state review board.
So, this is something. It's not quite in the form we want, but we can get there. And we can get there. Oh, yeah. Okay. Well, um I'm assuming at least some of you brought your glasses. Don't worry, the talk will be online later. And you do not have to read the IMR records, but this gives you an idea of sort of like what the data looks like, right? We've got like the physician reviewer found and then this is what they found.
Um, and then it's got their reasoning. And this is really important, right? Because it has the reasoning why they approved it or why they rejected it, right? Um, don't worry about it. You can go look these up online. You don't have to read this 10point font. But what we can do is we can go ahead and we can use a third LLM to say like, okay, cool. we've got C, right? Like so C is the product of A and B. We can ask what would A and B be that might have produced C. uh in this case what would be the denial and we can very easily sort of look at that and what would would have been the appeal that would have resulted in this and this gives us uh anonymized data because the IMR data notably does not contain the patient name or anything thank thankfully understandably um and it gives us anonymized data that is real but semi-synthetic um and in the format that we want and this is where I would use spark to run this across many models very quickly uh completely unnecessarily and you should probably just use a for loop but I used spark because I'm a spark nerd.
Okay, cool. So this gives us a bootstrap data set, right? This is a good start. Um we have data that is related to real patients but does not have any of their their personal information in it and we've got it in the format that we want. So now we need to fine-tune it, right? Um, how many people here have have fine-tuned large language models? Okay, a lot more than the number of people who have their insurance policy documents.
That is about what I would expect. Um, so there's a whole bunch of different tools that we can use. Uh, and we've got sort of an option here, right? Because we have anonymized data, it's okay that we're going to be using this data and shipping it off somewhere else, right? So we don't have to worry as much about controlling this data as we would for inference time. And so essentially because this doesn't contain any patient names or anything to tie it back to an individual.
And this is once again I'm not a lawyer. Talk to your lawyer before you send your data uh to Google Cloud or Data Bricks or Insert Vendor here. Um we can send it off somewhere else. So we don't have to buy a bunch of A100s. We can rent them for like an afternoon and we can use that to quickly fine-tune a model. and we can fine-tune a model down to something that we can actually do inference on in-house. Um, two of the tools that I really like are oxalottle and unsloth.
Um, oxalottle is very much like if you're the kind of person who's like, "Oh, I love YAML." Oxalottle is the tool for you. If you're the kind of person who's like, "Oh, I love Python notebooks." Unsloth is pretty great. And there's a whole bunch of other tools. Those are just two of the tools that I've played with a lot. Um, and we'll talk a little bit more about Unsloth when we get to the reasoning part. So, how do we pick our model to fine-tune?
Right? So, oxalottal and unsloth can both fine-tune a whole bunch of different models. So, one of my theories is that we want our inference to be cheap, right? We want to be able to appeal a lot of health insurance denials and we want to be able to appeal health insurance denials where it's like, you know, someone's heart medicine got denied. And so if it cost us $3 to generate an appeal, that's probably not good because the generic heart medicine isn't really all that expensive anyways.
So we really need to keep our costs low. Um so we want to make sure the model will be able to fit in memory on hardware that we can afford. Uh now depending on your background, hardware that we can afford can range from 1 gigabyte to um slightly more memory than is uh my storage. Uh so like it could be a terabyte, right? So depending on your background, you've got probably a fairly wide range. In my case, it's largely based on what the credit limit Chase has decided I should have.
Um, and at that point, so it is an RTX5090. Um, they did not want me buying a whole bunch of uh what is it? Not the A100, the H100's. Yes, my credit card would not be approved for purchasing an H100. So not 80 gigs. We're going to shoot for 30 gigs. Um, and in fact, when when I started this, I could only afford an RTX 4090 because the 5090 did not exist. Uh, so we were shooting for something that would fit very nicely in 20 gigs.
Uh, ideally, we want a model that's going to perform generally well. Uh, one of the things if you're working in a regulated domain is you're going to want to make sure that the model doesn't have a license that restricts you from using it in the regulated domain. Um, there are a bunch of models which essentially say don't use me in healthcare. Um, which is to be clear not necessarily wrong. I think that's very reasonable.
People don't want to be responsible for bad outcomes where people die. I get it. Um, so, right. Yeah. Uh, we're up to version 0. 5. I want to say I only got 0. 3 on the slide, but you you can probably figure out how to replace the number three with the number five. And you can go and you can look at our different models. Uh, and you can see that we've actually fine-tuned a whole bunch of different base models. Um, and yeah, so the these different base models are are all fine-tuned with this fantastic pile of shell scripts.
Um, you know, I love our world. It's YAML and shell scripts all the way down. Uh, and somehow it still ends up running on on CUDA eventually. Uh, so to fine-tune it, what we really need to do is we just need to make the JSON L file and then you can go and click on the pile of shell scripts. I assume people didn't want to read bash on slides today. If you do, you know, different strokes for different folks. You'll have fun.
Uh the masochists over at the leather party will will enjoy. Um and oxalottle simplifies this a lot. So, initially when I was doing the fine-tuning, I didn't have oxalottle. It was it was super painful. But so, we've we can fine-tune our model. You can click on this pile of shell scripts. We're we're pretty much good, though. So, we've got an initial model, and you can go check it out. Um and this is great. So, we can do some inference now.
And this is great, but now we've got people who are actually using it. And this is fantastic. I love that we have users. The problem is uh now we have to find ways to deidentify that information. Right? So we can't just depend on the semiynthetic transformations that we've been doing so far to go beyond that and incorporate the 6,000 plus appeals that we've generated. Um and so we need to keep the data safe. And this is my beautiful dog, Professor Timbit.
I asked my wife if I could bring him today and she said no. Are you an idiot? And I said yes. Um can I bring him? And the answer was still no. Um but so this is professor Timbit along with Tyigums uh protecting our user data. However, this does not scale because professor Timbit does not know the difference between sock 2 and a sock. Um so fantastic but not not great. Uh so there's a bunch of different techniques that we do and we'll look at some of these in the demo.
Uh, one of them is we actually try and strip out uh, personally identifiable information before it hits our servers. And so we do this by using really quite frankly terrible JavaScript. Um, does anyone here really love TypeScript? Oh, cool. If you're looking for an interesting open source project to contribute to, um, no. Okay. It was worth a shot. It was worth a shot. Um, but anyway, so we we try and strip out personal information before it comes back to our server and we sort of rehydrate it when it's going back to the client.
So the client is responsible for stripping out P uh personally identifiable information and rehydrating personally identifiable information. Um, it's super cool. If you haven't played with it yet, you should definitely do it. Fire up developer tools. You can watch the you can watch the requests going to the back end and you can see that it's actually like substituting out tokens for like your name, your address, and all these things.
They're being stripped out and they're just being rehydrated. I think it's cool. Um, to be fair though, I was a kid who read a book about. So, there's clearly something wrong with me. Uh, all right. So, these these rejaxes are fantastic, but they are limited, right? So I don't know how many people here remember the story of there is the programmer they have a problem they think aha I will use regular expressions and now they have an uncountable number of problems okay fantastic at least some of you remember it and the rest of you were were nice enough to laugh at my my mediocre jokes anyways so the reaxes aren't 100% so we can ask users to deidentify their own information as well so we can essentially like automate deidentification and then ask a user as well like hey we want to train on this.
Will you strip out additional information for us if you see anything here? Um, this is great in some ways and I think this talk might be being recorded. So, I'm going to avoid saying some words that my lawyer told me to avoid saying. Uh, but let's just say it's imperfect, right? Because users are great, but occasionally might not pay attention 100% of the time to the check boxes at the end of a form. Right? I don't know if any of us have ever maybe you know skimmed and just been like yes agree agree agree agree agree next right and so that is that is something that you you have to be aware of um legally have to interesting question uh well beyond my pay grade um startup founder gets paid zero dollars so most things are beyond my pay grade okay so um we solve that with humans as well so um essentially we we flag things for review and then we have humans go and look at this and make sure that the humans the other humans who we asked to do this did deidentify their data completely.
Um so okay how many people here are really excited about reasoning models? Okay. How many people are less excited after reading the Apple paper? Yeah. Yeah. So um yeah the Apple paper is it makes sense right? Like the model is not actually thinking. it's outputting tokens and these tokens are doing a good job of convincing us that it's thinking but also similarly if we think about it um yeah not intended joke um but if we think about it like it makes sense if we if we think about like the kind of corpus these things are trained on uh something where someone walks through the solution to a problem is more likely to get to the actual correct solution right even if we're just thinking about these as purely statistical models this logically has some basis of possibly being correct.
Uh that is pretty wishy-washy and if I could figure out a better way to sell that, I definitely would. Uh the problem though is when we want to fine-tune our model, right? And we want to have reasoning capabilities fine-tuned into it. So there's a whole bunch of different ways that we can do this. So most of the fine-tuning algorithms that we see essentially say like, hey, I want this answer to be really close to or match this existing answer that I've got, right?
And this is cool, but there are many different ways to come up with the answer that 2 plus 2 equals 4. Okay, maybe bad example, but there are many different ways to come up with the reason for why you should write it a different appeal, right? Like we could say like the patient is old and blah trans therefore or we could say the patient is trans and old therefore and these would both be correct, right? Like there's nothing wrong with either of these sets of reasoning.
So it's possible that focusing on having exact matches in the reasoning is not as beneficial. Uh so unsloth gives us the ability to write custom loss functions really easily in Python. And this is great. So we can say like hey if the reasoning kind of sort of matches oh yeah it's a party. Uh oxalottle not as easy to express that in YAML. Um it's a lot easier to express kind of sort of in Python uh than YAML. Um, other downside of when we go ahead and think about adding reasoning is that it's slow.
And it's slow not just at training time, it's slow at inference time, right? People are willing to put up with things that are a little bit slow in training because they don't see it. But at reasoning, if you take like more than five minutes, people are going to be like, "Is the computer broken?" And I, in fact, I get emails about this where they're like, "Hey, uh, is it working?" And I'm like, "Yeah, was did you still have the spinny circle?"
And they're like, "Yes." And I'm like, "Okay." So you you wait for the spinny circle to go away and they're like but I I didn't want to and then oh so there is a trade-off, right? So if we if we allow for arbitrary complex reasoning tokens or reasoning token length, this can actually make inference take too long and users will start to think our product does not work. Um okay, cool. So doing this we fine-tuned a whole bunch of different models and we mostly fine-tune them on Lambda Labs because uh they're pretty cheap. uh inferences done of course on hardware that I can afford.
But Lambda Labs was really chill and gave us uh GPUs that I could actually rent as opposed to the hypothetical GPUs uh in other clouds where I would go and press the button and they would be like come back later. Um and to be clear, right, like Lambda Labs is not perfect. They have not given me any money. Although if anyone's here from there, anyone? Yes. No. Ah, a girl's always looking for cloud credits. Um, if anyone knows someone who can hook me up with some cloud credits, I can replace this Lambda logo with insert favorite cloud vendor here uh for any cloud that has uh H100s.
Um, but yeah, and then we've got our little cute oxalottle. Oh, so cute. And then we've got a whole bunch of different models. Um, so fine-tuning these different models is actually pretty simple, right? Uh, if you're using something like oxalottle or unsloth, you can relatively easily swap out and try these different models for fine-tuning. Um, this is pretty great. There there are some like slight differences between them from a end users point of view.
I would say like the biggest difference tends to be in terms of sort of what context window lengths are supported. Um, and when you're trying to like shove a whole bunch of PubMed information in to trying to generate better medical appeals, uh, longer context windows are nice. And so the Gemma model has been really nice for letting us support pretty long context windows and providing a lot of information. Um, so that's that one's been pretty good.
Okay, cool. So, right, as I was saying, we have these fancy shell scripts. You should check them out. They're in the GitHub repo. Um, we've got run remote. sh, setup. sh, and run. sh. Um, you don't have to read them. You can just run them. And there's also some config files. Who likes YAML? No one likes YAML. Oh, man. Um, okay. Uh, here is my broken Vespa from the time I got hit with the BMW. Um, I do not recommend it.
Very unpleasant. Um, I will say YAML is more pleasant. And we'll leave it at that. Um, yeah. Okay. So, this is this is one of the sample model fine-tune configs. You can see there's a whole bunch of them in the GitHub repo. We can figure like what our sequence length is. The more sequence length we have, the more memory we need to use in fine-tuning and also at inference time because we need to be able to allocate that memory.
Uh we've got pad to sequence length true. Uh that's really useful because when I don't set it, sometimes we'll get part of the way through a fine-tune, we'll encounter a long record and then it'll fail and that's just not a really fun time because I might be asleep and then I'm spending like $4 an hour to sleep. I don't like that. No, I'll spend that to be awake, but not for sleep. Okay. Um, so how much does this cost?
It's it's about like a $100 to fine-tune these models. Um, which is which is pretty cheap, right? Like all things considered, you know, $100 not that bad, but there are some sort of concerns, right? Uh $100 is a lot more than the cost of inserting a document into open search, right? So you can see why you might want to use a hybrid approach of retrieval augmentation and fine-tuning. So for example, we probably wouldn't want to fine-tune our model every day with the latest PubMed studies.
That just doesn't make sense. Instead, we can use retrieval augmentation to provide the latest PubMed studies and just do a periodic fine-tuning when we've got like a sufficient number of appeals have been generated that it makes sense or, you know, there's been a big change in insurance policy in America, then it's probably time to do a big refinet uh for the $112. On the other hand, you know, if you work at a company with a corporate credit card and it's not your $112, why not?
You can finetune every day. Um, if you do work at a company with a corporate credit card, uh, I recommend buying several copies of my book, High Performance Spark. Uh, for a mere $40, you too can help save a developer turning from a life of enterprise support contracts. It's such a shame watching them go to meetings, wear a tie. O, that's a joke. I don't wear ties. Okay. Um, so now it's time to serve our models. Has anyone here ever been to Hurricane Electric in, California?
Really? Oh my god, it is amazing. It is the world's cheapest data center in the Bay Area. Okay, so it's the cheapest data center in the Bay Area. Uh, and you can get really, really low cost. Yeah. Um, there's other good things about it, too. They have a cat. The cat's name is Cat 5e E after Cat 5 sadly passed. um who keeps the facility relatively rodent free, right? We all love relatively rodent-free data centers. Um and yeah, okay, so we're going to do our inference on prem.
Uh and there's a whole bunch of different reasons why I chose to do inference on prem. One is cost, right? So we can rent uh a data center with not an entire data center to be clear. Sorry, I'm not that fancy. But we can rent a rack in a data center with 15 amps of power uh driving distance from my house for like about $400, right? And compared to the cost of renting a GPU that can do this serving, that's probably about like on the low end 2K a month, right?
And that's that's assuming that we're just using one GPU, right? If we're using a whole bunch of GPUs, the cost can quickly become 10K versus $500, right? And you know, when you're a bootstrap startup and you, you know, you've got Doc Martens that are falling apart, you probably don't want to just hand all of your money over to GCP. Um, the other reason is you don't need a BAA with yourself. Um, right? So, generally speaking, I can trust myself to do the things that I want to do with my data.
Whereas, if I hand it over to someone else, that's a bit harder. I need some lawyers, and lawyers cost money. Um but but realistically, right, the thing here is inference data is more likely to accidentally contain PII or PHI. Um even if you do have things to deidentify somewhat, the chance of it not being caught and accidentally slipping through is higher. And so the more you can do to control that data and keep it safe, the better.
Um okay, final note. Uh I got some wonderful ARM GPUs from Nvidia. None of the software on them works. very sad. Uh, we actually just use them to run Django. Um, another thing that I learned in this is consumer graphics cards do not fit nicely into most servers. Uh, market segmentation is a thing, sometimes physically. So, uh, solution. Uh, there's a bunch of desktops in the bottom of the rack now. And we've got like flashing lights.
It looks like, you know, a very weird gamer's sort of setup. Okay. Uh so VLM for serving uh okay this cuts off the match label at the bottom it's not super important um but you know standard YAML the important thing here is yes we're doing this on prem but if we like raised a whole bunch of money and tomorrow we had 100,000 users per day uh we could go sign a baa with like Google right similar things you could do um and then you can transition easily from doing your on-prem serving to doing your burst serving Um, it's one of the things I like about Kubernetes makes a lot easier to sort of scale up quickly.
Um, so even though admittedly Kubernetes for a single rack is kind of silly, it does make sense in terms of like, hey, pick things that can scale quickly. Um, and this is one of the other things I love about open source. Here you can see this is old. It says 03. That should say '05. Doesn't make a huge difference. Um, but it's good. Uh, the max model length also changes. And enforcing eager helps keep it from crashing at runtime as well.
Crashing at runtime is terrible. I don't like it. Um I prefer things to crash at deployment time because then I can fix them before I get emails from users. Personal preference. Cool. So, right, $400 per month. Okay, sure. We still have to advertise the cost of the hardware, right? Like on the other hand, uh we can buy an RTX3090 for $748. And that was like two years ago. they've gone down in cost. Um, so even we advertise that $748 over a year, we're still coming out ahead compared to renting comparable resources in the cloud, right?
Not that there's anything wrong with the cloud, but there are times when the cloud doesn't make sense, right? And in my mind, that's when we have relatively static deployments that we don't need to scale up and scale down. Um, of course, having worked for Google, I'm sure they would say different things. Uh, and we can make it go faster by throwing money at it. Has anyone been to MicroEnter in Sunnyvale? Did you get the 20% off?
No. Oh, too many people. The 20% off deal is still going. Not sponsored by them, but you should definitely check it out. Um, they have 20% off most desktops, and you can use that coupon to get faster inference. And that's that's what I did. um because I was able to buy a uh computer with an RTX 5090 inside of it. Uh it is not yet deployed. Um but I'll get to that really soon. I just have to drive down to, California, and I have to borrow the car because it doesn't fit on a motorcycle.
Um yeah, there are downsides to using physical hardware. Your deployment time does go up from seconds to weeks. Um but you know, pretty great. Uh demo. Yay. Yay. Okay, cool. Let's hope that this works. Uh, and the keyboard mapping is a little funky, so my apologies if this Oh no. Okay. Uh, we are. Yeah. Oh god, I can't read that. And it Oh, okay. This demo might be a little rough. Uh, I'm gonna I'm just going to Google search instead of going for that.
Let's go fight health insurance. We have a site map. Cool. Okay. Fingers crossed it doesn't crash. Everyone send good vibes. Um, so right like this is this is sort of one of the things I was talking about. So we do have collect PII, but this is actually client side. So we we use session local storage to store the PII here. So we're going to put in. Oh, no. Actually, we're going to go with Timbit, my dog's name, and I'm going to use because then we exclude it.
Um, and my zip code is 94110. Cool. Um, we would upload a health insurance denial, but I don't have one on this laptop because it's like the presentation laptop. So, instead, we're just going to type it in. Uh, dear Timbit Carol, your request for prep has been denied as not medically necessary. Can't spell for but that's probably good enough. Uh, sincerely, Dr. Evil Evil Insurance Co. , uh, cool. And then we press our little remove PII button.
Huzzah. Uh, scroll up. Yeah. Okay. So, swapped out patient name. It would swap out other things, too, if we put them in and we had a real thing. Uh, we've got our policies that we would definitely read thoroughly. And the only reason I'm checking these without reading them is because I've already read them, and you should always read all of the policies you agree to on the internet. Um, okay. I Oh, god. Sorry. This demo is being rough, but not for any of the reasons I was expecting.
Come on, clicking. Come on. Huzzah. Thank you. Thank you. I clicked a box. It's It's a pretty good day. It's a pretty good day. My grade one teacher would be pretty proud with me. Could not write my name for Um Oh. Oh, damn it. Okay, cool. Uh optional. We can add health some health history stuff here. We're just going to skip that today based on how much fun I've been having. Plan documents. This is how I know very few people have their plan documents.
Almost no one provides these. Um cool. And so now our Oh, I meant to fire up developer tools. Okay. Um, well, I don't think we can read developer tools very well on this. I can't read. Can anyone read what's happening in the developer tools space? No. Okay, you're going to have to trust me. And uh, we're going to say good things. Definitely working. Uh, so here, you know, we've got prep medical necessity. It's guest um state California high-risisk behavior.
Fantastic. We click our little robot checker and then we go forward again and then come on. Cool. We've got a bunch of questions. Again, we're going to skip these based on my experience trying to check boxes on this computer, but if you were doing this for real, you would check boxes. These are dynamically generated questions come from the model. And here we've got another picture of my dog. and how adorable he is. Oh no, it's cut off.
Okay, you'll have to trust me on the fact that my dog is incredibly adorable. Um, okay. Oh, and it has turned to the um what's it called? Yellow light, which says I don't have a lot of time left. So, do we want to do some questions while we wait to see if the appeals generate? Yeah. Does anyone have any questions? Alternatively, we can go back and finish the final few slides and come back and see the appeal generation if no one's got any questions.
Um, if you want to talk with me uh more, I'm on LinkedIn. I'll be doing a book signing at the O' booth at 3 p. m. for I'm pretty sure High Performance Spark. I didn't actually ask them which book. Uh, it could be the Raybook. It I would be surprised if they brought the Ray book to the Spark conference, but stranger things have happened. Uh, so come by, uh, see me at 3 PM at the O' booth. If you want to hang out with me on Discord, uh, and talk about the open source stuff that we're doing, you can go ahead and do that.
Um, I'm going to be doing a part two of this talk in November, uh, where we'll be looking more at the chat interface uh, for the AI for good stuff. Um, and yeah, if you know patient access groups that would like to use the software, let me know. Or if you just like love spark fun or CFKA fun, uh go check out, my co-author's awesome talk Wednesday at 3 p. m. in room 154 uh in this same building. Um and I'll be there too, of course, and happy happy to talk more uh in the hallway because now it's blinking red and kind of mad at me.
The numbers are going up. So, thank you all for coming.

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.