1 00:00:00,000 --> 00:00:01,200 Hello everyone. 2 00:00:02,500 --> 00:00:08,480 So it looks like the projector doesn't work, so I'm just gonna dry talk this. 3 00:00:09,520 --> 00:00:16,920 So we're Pamir AI, P-A-M-I-R dot AI, you can just look it up. 4 00:00:17,100 --> 00:00:29,140 So we are a small startup at San Francisco, so we specialize at just bridging AI and hardware, put it together, try to use that to help other people to build hardware. 5 00:00:29,740 --> 00:00:42,040 So this talk is mainly about how we use that to enable one of the villages in DEF CON, and how do we power there. 6 00:00:42,760 --> 00:00:50,120 It's a biohacking village, so I'm gonna talk about how is that gonna enable medical-related stuff. 7 00:00:51,420 --> 00:00:55,560 Yeah, so the company is built by just me and my co-founder. 8 00:00:56,120 --> 00:01:03,580 I used to work at Microsoft and Qualcomm, so that's how we know how to handle the AI and hardware part of stuff. 9 00:01:05,880 --> 00:01:10,340 So how do we run AI model today, right? 10 00:01:10,340 --> 00:01:27,440 For any model that's larger than 70 billion parameter, like whatever you use on chat GPT is huge models, you can only host it at a GPU cluster, which we probably don't have it at home. 11 00:01:28,120 --> 00:01:34,800 So most of the people that use the model are ranging like 13 billion parameter to 30 billion parameter. 12 00:01:34,800 --> 00:01:43,740 You can run that on a really good MacBook or like a Mac Studio size of hardware, which is still very expensive. 13 00:01:44,960 --> 00:01:52,720 And then you can drop that down to like 0.5 billion parameter to 7 billion parameter, those kind of stuff. 14 00:01:52,720 --> 00:02:03,000 You can probably run on a very good phone and you can get a decent result out of it, but it's not gonna be as smart as chat GPT, right? 15 00:02:03,460 --> 00:02:08,100 So that kind of leads where our company started. 16 00:02:08,180 --> 00:02:09,980 What about embedded system? 17 00:02:09,980 --> 00:02:23,660 You know, there's a lot of hardware stuff is built on a single board computer, like Raspberry Pi, Arduino, ESP32, those kind of stuff, no one's building a local AI for that, right? 18 00:02:23,720 --> 00:02:34,660 So that, but fortunately in the past half a year, there's a lot of progress in the open source community made. 19 00:02:35,020 --> 00:02:41,020 Like there's model called Quinn, Q-W-E-N, you can look it up. 20 00:02:41,020 --> 00:02:46,180 And also Lama, they released a 1B model to a 3B model. 21 00:02:46,540 --> 00:02:54,580 And a lot of stuff done by Hugging Face, it's called a small LLM, S-M-O-L-L-L-M. 22 00:02:55,500 --> 00:03:03,060 They released a lot of three billion parameter to four billion parameter model that's also really good. 23 00:03:03,140 --> 00:03:12,840 Also Google has one particular model called Gemma, that's also a performance very well. 24 00:03:12,840 --> 00:03:19,520 So thanks to the open source community, we now have a small enough model that we can squeeze into an embedded system. 25 00:03:19,880 --> 00:03:25,080 So that's where our company start to mess around, prototyping those kind of stuff. 26 00:03:26,360 --> 00:03:31,340 So I tried some of the model on Raspberry Pi so you don't have to. 27 00:03:31,640 --> 00:03:38,020 Around one billion parameter, you can get like okay-ish communication going. 28 00:03:38,020 --> 00:03:43,260 Like it's not very smart, it's kind of like talking to a 10 years old. 29 00:03:43,260 --> 00:03:46,140 It can tell story back to you. 30 00:03:46,640 --> 00:03:47,960 So that's that. 31 00:03:47,960 --> 00:03:56,300 But when you get it to like two billion parameter, it can start to make like JSON type of request. 32 00:03:56,300 --> 00:03:58,320 So it started getting useful. 33 00:03:58,600 --> 00:04:08,960 Once the model reached three to four billion parameter, it's starting to get very reliably calling like a Python function. 34 00:04:09,300 --> 00:04:14,860 So that's where we start to collaborate with Spell Hacking Village. 35 00:04:14,860 --> 00:04:19,360 We made this badge that's built on a Raspberry Pi 5. 36 00:04:19,440 --> 00:04:23,300 If you want to get it, you can check out at the Spell Hacking Village booth. 37 00:04:23,600 --> 00:04:34,260 So essentially we miniaturized inference engine into a badge form factor and we can make it to control real sensor and do simple medical QA. 38 00:04:34,600 --> 00:04:37,780 So there's like four LED on the badge. 39 00:04:37,780 --> 00:04:44,840 You can talk to it and it will try to rationalize what kind of color you want. 40 00:04:44,840 --> 00:04:49,500 And make a Python request to turn on those RGB LED. 41 00:04:49,680 --> 00:05:00,500 And the funny thing is when you say, I want to write a green or blue color, it was able to very reliably recognize those comments. 42 00:05:00,500 --> 00:05:10,200 However, if you say, I want a pink or purple, which require reasonability, the model start to not getting it, right? 43 00:05:10,200 --> 00:05:11,980 Because they cannot one-shot it. 44 00:05:11,980 --> 00:05:13,340 It's a RGB combination. 45 00:05:13,340 --> 00:05:18,000 So they have to think, okay, what's the combination for pink, right? 46 00:05:18,000 --> 00:05:24,340 It's probably like 100 for red, then 50 for green. 47 00:05:24,340 --> 00:05:28,740 So that's where the small models start to become not so smart. 48 00:05:28,740 --> 00:05:35,620 So sometimes it give you a wrong color, but we know it's smart enough to control simple sensors. 49 00:05:35,620 --> 00:05:48,500 Like if you give it a moisture sensor or just like a simple, I don't know, IR sensor, it can probably help you to use that, right? 50 00:05:50,060 --> 00:05:58,700 And I really encourage everyone to check an open source model called MedGemma, M-E-D, Gemma. 51 00:05:58,700 --> 00:06:01,700 It's an open source model made by Google. 52 00:06:01,700 --> 00:06:05,080 They made a lot of interesting research on that model. 53 00:06:05,080 --> 00:06:12,920 They use it to do clinical reasoning for medical records and just general medical knowledge answering. 54 00:06:12,920 --> 00:06:17,800 We actually put a four billion parameter model into this Raspberry Pi. 55 00:06:17,800 --> 00:06:35,980 So it's not like hyper accurate, but yesterday someone came by and asked like how much of antibiotics medicine I should give to a two years old. 56 00:06:36,160 --> 00:06:43,240 So he kind of gave back an answer in terms of milligram, and that's kind of in a correct range. 57 00:06:43,240 --> 00:06:54,640 So we were surprised, okay, it definitely knows more medical stuff than me, but I think that's good enough for like a doomsday device part. 58 00:06:54,920 --> 00:07:04,740 Also, Google mentioned they use it to do X-ray, chest X-ray report generation, and it turns out it's pretty decent. 59 00:07:05,080 --> 00:07:07,960 So I encourage everyone to check that out. 60 00:07:08,980 --> 00:07:13,860 So what if, so we know with a small model, we can get that far. 61 00:07:13,860 --> 00:07:23,600 So what if we put like just like chat GPT or isotropic, those huge model to enable them on the device, what's gonna happen, right? 62 00:07:24,960 --> 00:07:36,330 So imagine we put, I know if anyone here is a technical, like I use cursor, those kind of AI IDE to code every day. 63 00:07:36,330 --> 00:07:39,590 So imagine we put that into embedded system. 64 00:07:39,810 --> 00:07:47,410 So what's gonna happen is you put in plan language, you connect sensor to it, it can generate and load the driver for you. 65 00:07:47,410 --> 00:07:53,330 Also, it can probably log the data for you, build a UI for you and retry on arrow. 66 00:07:53,330 --> 00:08:01,610 You don't have to write a single line of code because the whole embedded system is controlled by AI agent essentially, right? 67 00:08:04,530 --> 00:08:14,210 So some example we've done in the past by just leveraging the isotropic model to control a full Linux system, let's see what it can do, right? 68 00:08:14,210 --> 00:08:21,730 So I had this flipper zero thing and I wanted to write a screen saver for it, but I don't know how to do that. 69 00:08:21,730 --> 00:08:27,010 So I connect that to the single board computer we made. 70 00:08:27,010 --> 00:08:29,910 It's like this size and there's a Raspberry Pi 5 in there. 71 00:08:29,910 --> 00:08:35,450 It gives full control of that Raspberry Pi to a very big cloud model, right? 72 00:08:35,450 --> 00:08:46,030 So we find out there's a command line driver or like a SDK for just writing flipper zero customized code. 73 00:08:46,030 --> 00:08:49,910 So it's just utilizing that to run me a screen saver. 74 00:08:49,910 --> 00:08:59,950 Similar thing for Arduino or Raspberry Pi, I plug it in, tell it what's the serial number, like what's the product number on what type of Arduino it is. 75 00:08:59,950 --> 00:09:01,210 It will go download. 76 00:09:01,210 --> 00:09:04,050 There's actually a Arduino IDE CLI. 77 00:09:04,070 --> 00:09:09,550 I didn't know that, but the AI found that thing and just programmed the Arduino with a CLI. 78 00:09:10,490 --> 00:09:13,950 There's also, so we also do similar thing to a thermal printer. 79 00:09:13,970 --> 00:09:21,490 So, you know, we bought a thermal printer from Amazon and, you know, those kind of type of thermal printer, they can only print shipping labels. 80 00:09:21,570 --> 00:09:23,130 It's only designed for shipping labels. 81 00:09:23,130 --> 00:09:26,390 But I want to use a printer to print whatever I want. 82 00:09:26,390 --> 00:09:29,490 Because I already paid for it, I want to print stickers on it, right? 83 00:09:29,490 --> 00:09:31,530 So I plugged in this device. 84 00:09:31,550 --> 00:09:36,230 It figured out, oh, this is this brand of printer. 85 00:09:36,230 --> 00:09:41,770 They do have a driver for Windows and Mac, but they don't have a driver for Linux. 86 00:09:42,430 --> 00:09:46,050 So , however, it's a printer, so it's using a universal protocol. 87 00:09:46,050 --> 00:09:47,910 So it kind of reverse engineered the printer. 88 00:09:47,910 --> 00:09:49,870 I wrote a whole driver for the printer. 89 00:09:49,870 --> 00:09:54,590 Now I can print whatever I want with the printer. 90 00:09:55,090 --> 00:10:01,350 So we also sponsored multiple hackathons in San Francisco. 91 00:10:01,390 --> 00:10:07,950 Some people brought a Roomba that they don't need anymore, but they want to control the Roomba. 92 00:10:07,950 --> 00:10:12,410 So it turns out there's also a USB port for that Roomba. 93 00:10:12,410 --> 00:10:15,250 So they plug in a Roomba to the device. 94 00:10:15,250 --> 00:10:19,830 Of course, the device, the almighty AI found the driver for the Roomba. 95 00:10:19,830 --> 00:10:23,630 Now they can use the Xbox controller to control the Roomba. 96 00:10:24,990 --> 00:10:36,790 But, so, all that is telling us, you know, I used to just copy paste code from Arduino IDE to a chat GPT and ask question and copy paste it back. 97 00:10:36,790 --> 00:10:43,270 But now I can just, you know, chat with it and just write a driver and do everything for me now. 98 00:10:43,270 --> 00:10:46,390 I think that's kind of the future we're going at. 99 00:10:47,270 --> 00:10:55,050 And I think it's relevant at DEF CON because, you know, if you have an AI in your pocket, it can slightly hex stuff for me. 100 00:10:55,530 --> 00:10:59,450 But can we eventually do all that locally, right? 101 00:10:59,450 --> 00:11:05,770 Right now I'm using, I don't know, one trillion parameter on the cloud, but I do want to use it locally eventually. 102 00:11:05,770 --> 00:11:13,710 So there's a paper came out, it's called Multi-step Planning and Reasoning Improves Acting Agent. 103 00:11:13,890 --> 00:11:22,450 You can look it up, it's a long title, but if you Google pre-act paper, it'll probably show up. 104 00:11:22,450 --> 00:11:41,110 So essentially there's a team of researchers, they find out, oh, if you just fine tune like 70 billion model on those kind of syncing, replanning data set, it can eventually be as good as the huge model run by OpenAI. 105 00:11:41,110 --> 00:11:49,190 So I think in the next two or three months, we can get all those stuff like running on my MacBook or just a Mac Studio. 106 00:11:49,810 --> 00:12:05,870 So we'll get there to run everything locally, which I think is very important for since like medical device or anything that involves my biometric data, I don't wanna send that to OpenAI, right? 107 00:12:06,930 --> 00:12:14,310 Also, you know, if anyone works for a medical device company, the UI is hella complex. 108 00:12:15,030 --> 00:12:23,510 I don't know how to operate that, but if there's a local model that I can just drop the manual or SDK off the machine, it can operate for me. 109 00:12:23,510 --> 00:12:29,990 I think that will enable a lot of medical automation industries 110 00:12:33,490 --> 00:12:36,090 researchers to utilize them, yeah. 111 00:12:37,290 --> 00:12:40,370 Yeah, that's pretty much of the talk. 112 00:12:40,370 --> 00:12:46,490 If you got any question, you can stop by the Biohacking Village booth and to learn more. 113 00:12:46,490 --> 00:12:47,510 Yeah, thank you.