On-device ML: Artificial Intelligence in your pocket
Priyanka Kulkarni21:592023
Câteva sute de megaocteți de model pot însemna sfârșitul unei aplicații mobile
Un model tipic de deep learning are câteva sute de megaocteți, iar sondajele arată că lipsa spațiului de stocare și consumul de baterie sunt cele mai frecvente motive pentru care oamenii dezinstalează aplicații. Echipele care mută AI din cloud pe telefoane trebuie să câștige simultan la memorie, viteză și securitate, adesea pe dispozitive de gamă medie și joasă. Priyanka Kulkarni, senior machine learning engineer la Adobe, descrie acest teren: cum micșorezi, accelerezi și protejezi un model care trăiește în buzunarul clientului?
Află strategiile de compresie, accelerare și watermarking care fac practic ML-ul pe dispozitiv
Priyanka Kulkarni, Senior Machine Learning Engineer la Adobe, explică ce presupune mutarea modelelor de deep learning de pe serverele cloud pe telefoane și alte dispozitive edge. Ea analizează trei provocări (dimensiunea modelului, eficiența modelului și securitatea) și prezintă compresia, căutarea arhitecturilor neuronale, acceleratoarele hardware, watermarking-ul modelelor și învățarea federată ca soluții.
“O aplicație de dimensiuni mari înseamnă sfârșitul pe mobil.”
“Așadar, menținerea unei dimensiuni mici a modelului pe mobil și a unei latențe scăzute este cu adevărat nenegociabilă.”
What you will learn
Cântărește beneficiile de cost, latență, conectivitate și confidențialitate ale rulării modelelor pe dispozitiv în locul cloudului.
Alege arhitecturi potrivite pentru mobil, precum EfficientNet, MobileNet sau MobileViT, și micșorează-le prin pruning, knowledge distillation și cuantizare.
Folosește căutarea arhitecturilor neuronale și rețele scalabile de tip Once-for-All pentru a viza mai multe medii hardware fără a o lua de la capăt de fiecare dată.
Diagnostichează jank-ul cauzat de competiția pentru GPU și adaptează straturile modelului la acceleratoare hardware precum XNNPACK sau Apple Neural Engine.
Protejează IP-ul modelelor implementate prin criptare, obfuscare, limitarea cererilor și watermarking pentru rețele neuronale.
Details
Level
Intermediate
Format
Talk
Technical depth
Practitioner
For
Mid-career, Senior individual contributor
Length
21:59
Published
June 2023
Questions this talk answers
De ce să rulezi machine learning pe dispozitiv și nu în cloud?
Inferența pe dispozitiv evită costurile de centre de date și lățime de bandă și funcționează indiferent de conectivitate. Oferă utilizatorilor rezultate în timp real și le păstrează datele private, deoarece acestea nu trebuie trimise sau stocate pe un server.
De ce este dimensiunea modelului o constrângere atât de critică pe mobil?
Un model tipic de deep learning are câteva sute de megaocteți, iar o aplicație mare înseamnă sfârșitul pe mobil, mai ales pe piețele emergente unde domină telefoanele de gamă medie și joasă. Vorbitoarea a citat sondaje care arată că lipsa spațiului de stocare și consumul de baterie sunt cele mai frecvente motive de dezinstalare.
Ce este jank-ul și cum îl pot reduce echipele de ML pe dispozitiv?
Jank-ul înseamnă cadre sacadate care apar când GPU-ul gestionează simultan randarea interfeței și inferența modelului. Echipele îl pot analiza cu instrumentele pentru dezvoltatori din iOS și Android, pot adapta straturile la acceleratoare hardware și pot distribui calculul straturilor între acceleratoare.
Cum își poate proteja o companie un model după ce a fost implementat pe dispozitivul unui utilizator?
Practicile obișnuite includ criptarea, obfuscarea și limitarea numărului de cereri pentru a reduce atacurile adversariale. Watermarking-ul rețelelor neuronale adaugă semnale ascunse de proprietate care nu afectează acuratețea și rezistă la eliminare.
Cum ar putea funcționa un watermark într-un model de limbaj precum ChatGPT?
O tehnică propusă selectează anumite tokenuri dintr-un set aleatoriu și le favorizează discret în timpul generării. Cititorii obișnuiți nu ar observa, dar un investigator ar putea urmări selecția tokenurilor pentru a dovedi că textul provine de la model.
De ce dimensiunea aplicației înseamnă sfârșitul pe mobil (48 s)
Protejarea modelelor AI de pe dispozitivele utilizatorilor (63 s)
Cum ar putea funcționa un watermark ascuns în ChatGPT (43 s)
All right. I guess we can get started. Hello, everyone. Hope you're all doing well. And thank you for attending this session. I'm Priyanka Kulkarni, and I specialize in building neural networks for on-device deployments at Adobe. Today, I'm going to talk about building on-device machine learning solutions to create, and I'm going to talk about building on-device machine learning solutions to create new technologies.
An AI-powered future that is fast, reliable, and secure. It's no surprise that mobile has become a predominant surface for AI interactions. We all want machine learning-powered magic at our fingertips everywhere we go. You all have probably used some form of AI on your phones for work, for travel, for shopping, or simply because you're bored. And there's tremendous demand rising for apps like digital assistants or face recognition and augmented reality.
An AI-powered technology, where people are reaching for their phones to engage with AI daily. An AI-powered technology. This has led to a huge uptick in the mobile AI market, now worth billions of dollars and rising. Recent studies have shown that applications that have advertised their association with OpenAI or ChatGPT, have seen their revenues jump dramatically in the past few months, as consumer demand around these technologies have skyrocketed. As more and more apps are incorporating machine learning into their offerings, This intelligence is moving closer to the edge where the computations are locally rather than in the cloud.
So in today's talk, I'll touch upon why on-device machine learning is important and relevant today more than ever, understanding the risks and challenges that come with the fabric of mobile platforms, including the security ones, and strategies that we can adopt to push the boundaries of neural network deployment across edge surfaces. The typical state-of-the-art neural networks are so large and computationally expensive that they require huge data centers with clusters of CPUs and GPUs to be able to run them.
They are too big to fit on edge devices and expensive to even run inference. So add to this bandwidth costs of transferring the data from the user's devices to the cloud, and you can tell that all of this adds up really quickly. On-device machine learning means that you can save all of these costs. This is also great for customers because now they can enjoy the benefits of access everywhere, regardless of connectivity, get instantaneous or real-time results, and assure data privacy.
Nobody likes the delay when the data is being streamed to the cloud, processed over there, and then sent back. And we can skip this whole hassle with on-device models. And because the data doesn't have to be sent to the server or stored there, there are fewer opportunities for cyber criminals to exploit any vulnerabilities, which also helps to preserve the sanctity of the data.
Now, integrating machine learning on the edge is nothing new, but the explosion of ML models in the world around us poses an increasingly difficult challenge to fit all of these intelligent systems onto resource-constrained devices like our mobile phones, which have limited compute, battery, memory, storage. Add to this mix, the generative AI race. I'm guessing you all have seen or heard about the mania around ChatGPT, DALI, mid-journey, and their mind-boggling abilities to write essays or create art.
I mean, I've been hooked to those apps for too many hours. And as generative AI is booming, so are the costs of running these models. They are way too large by smartphone standards and cannot be just taken off the shelf and run on our phones. So you can guess what the first challenge with on-device machine learning is, the model size and capacity.
We need a model that's small and fast, yet can provide high accuracy on the intended task. A large app size is the death knell on mobile. This is especially so in emerging markets around the world, where mid to low range smartphones are the majority. So we can't have our machine learning models driving up the app sizes by a few hundred megabytes, which is a typical size of a deep learning model.
A smaller size of the model also means we have fewer parameters than usual for the model to learn the task effectively. And in addition to this, we need to invest in accelerating the model inference so that we can provide users with low latency. These challenges are highlighted by innumerable surveys that show that a lack of storage space or battery running apps are the most common reasons for mobile app uninstalls.
So keeping the mobile model size low and the latency low is really non-negotiable. Finding this trade off between model accuracy and latency has become key in research as well. For instance, this chart tells us the relationship between a model's accuracy and its latency as we scale up the size. Each color here represents a specific architecture. And from looking at this, we know that the purple architecture gives us a really big boost for accuracy for a comparatively small increase in latency.
So it must be a really efficient model. And so happens that this model is also named efficient net. So it seems like a really good candidate for on-device models. In the bubble chart on the right, the size of each bubble represents how many parameters each model has. Here we see that the older models called BGG nets are the biggest models here and were created with a staggeringly high number of parameters.
Over time, though, research has taken machine learning models towards the direction of using fewer parameters and fewer operations while maximizing accuracy. And this is evident from the concentration of the models towards the top left section of the chart compared to where the old BGG models had started out. So it's great news that literature and industry is taking notice of how models can be made smaller as well as more efficient, which bodes well for on-device ML.
Typically, we've seen so far that convolutional neural networks remain the dominant choice for mobile deployments, where a majority of the deep learning models on mobile devices were some variant of mobile net. Mobile net architectures were developed with the intention to address the resource bottleneck seen on mobile. But over the past couple of years, the landscape of deep learning has been completely revolutionized with the advent of transformer based models.
These models have several advantages over CNNs, including introduction of attention layers for better information mapping and learning, as well as nuanced understanding of language. Following this, there's also been an interest of adapting transformers for mobile. However, they have been far more challenging to convert and run on device as compared to CNNs because they have more complex layers, higher floating point ops, and also exhibit much higher memory usage.
In attempts to optimize transformer models, so far we have seen that we've achieved varying degrees of mobile friendliness. This has raised the question if we can design architectures that are as mobile friendly as continents, but as efficient and accurate as transformers. A number of hybrid architecture designs have been proposed for combining advantages of CNNs with transformers for maximum efficiency, and mobile VIT is one of them where local processing done in convolutions are replaced with global processing using transformers.
Now, the selection of model architecture is crucial, but we also need to optimize the model further by shrinking it as much as we can. For this, we can use model compression techniques. This domain has seen various techniques developed over time and is widely being used already in literature and industry. These include things like network pruning to get rid of redundant or less important neurons, knowledge distillation from a teacher model to a smaller student model, as well as quantization to lower precision values.
As effective as these techniques have been, they are not that easy to automate, and it involves a lot of manual cumbersome tweaking and tuning to squeeze out every bit of optimization we can get, which is indispensable and goes a long way for mobile deployments. To combat manual tuning of models, you may have heard about the rise in popularity of neural architecture search.
So this is the process of automating the design of neural networks, where you search amongst various combinations of layers to create an architecture for your model requiring minimal human intervention. This is a fantastic way to find an optimal and efficient model where we can search for architectures that would work great for mobile. But what happens when we have diverse deployment scenarios on the edge like mobile browser or web.
These all present different resources as well as limitations for deployment. So we could deploy the same model across all of them, but then we'd be limited by the most constrained environment and end up being wasteful or inefficient in the others. So why not use neural architecture search to find a model tuned for each specific hardware environment. So this is a great idea.
But as these environments increase and scale, instead of rerunning neural architecture searches each time, we would want to find an effective way of walking the accuracy and latency curve for these models so that we can have greater flexibility and velocity to market. There has been interesting research in this field of scalable architectures, one research group at MIT has published a solution called once for all that attempts to tackle this problem.
And what they've proposed is training a single giant network, which we can then sample for smaller specialized sub networks of different sizes and different capacity, and then deploy them in various scenarios and target hardware. Also, not to forget that scalable architectures are like once for all ensure we're heading into the next generation of AI responsibly, because then these searches are targeted and optimized, so they are far better for the environment than traditional neural architecture search engines.
The second challenge with on-device ML is model efficiency. Due to resource limited environments on edge devices, our model needs to maximize its efficiency to consume the least amount of resources it can. This could be compute or memory. The on-device hardware landscape is also very diverse, especially on Android, where there are so many different manufacturers and hardware makers, leading to a spectrum of diverse resource limitations across all devices.
On mobile, this resource limitation often results in a contention problem, which if not handled properly can result in a symptom observed called jank. Consider a scenario where the GPU is simultaneously being called upon for UI graphics rendering requests, as well as running inference on machine learning models. This is common with real-time or interactive ML features where a user could be scrolling on his or her phone while the machine learning model is running simultaneously in the background.
In this case, you would get an experience like you see on the left-hand side, where there are more stuttering frames during the scroll. And this is called jank. While the right side presents a smoother scrolling experience for the user. There are now a lot of mobile developer tools available on iOS and Android to help us profile as well as measure jank.
We can mitigate against it. The CPU and GPU are not the only resources available on mobile. There are diverse set of hardware accelerators available across all platforms. One example is the XNN pack on TensorFlow Lite, which is a highly optimized library that enables faster CPU performance, including speed up of quantized models. Likewise, on iOS, the Apple neural engine is a special type of processor unit that you can leverage to make your ML models really fast by accelerating operations like convolutions and matrix multiplies.
There are a lot of other companies besides Apple developing their own AI accelerator chips, and you might have heard of Google's sensor processing unit as well. Even with all of these diverse hardware accelerators, there's a possibility that your ML model may not be able to use all of them. Many common layers seen in machine learning models may not be supported.
So we need to tailor our models to make the layers compatible with the accelerators that we intend to use. We can also parallelize the inference by developing an intelligent system to delegate and distribute the load of computing different layers using different accelerators. And this becomes even more critical when we have to run multiple ML models in parallel where they're all contending for the same device resources.
The third challenge of on-device ML is security. A significant amount of time, costs, data, and resources go into the development of each deep learning model, and it's critical to protect its intellectual property. When we deploy a deep learning model to the edge or on-client devices, they are far more vulnerable there than when they're queried using APIs in the cloud.
Thinking about the cybersecurity aspect of model protection is crucial. There are a lot of common best practices to safeguarding your deep learning model, like encryption, obfuscation, as well as limiting the number of requests to curb the potential for adversarial attacks. There's also research being done for embedding ownership signals into deep learning models directly, called watermarking. So this is similar to the watermarking techniques used to protect creator rights for digital images, video, and audio, and it has been a really effective technique to prove the ownership, authenticity, or integrity of these creations.
Neural network watermarking is a bleeding edge area of research to incorporate IP protection into deep learning models. These techniques aim at embedding ownership signals by inserting watermarks or backdoors into models that are so well disguised that it's hard to detect them. Aside from acting as the ownership proof, they do not affect the accuracy of the model and exhibit no other behavior.
And lastly, the watermark also persists against adversarial attacks, which makes it difficult or impossible to remove it. There's been some exciting research in extending this domain for watermarking generative AI models too. Watermarking gen AI is imperative not only to protect intellectual property, but also to prevent potential future malicious uses of language models like plagiarism, misattribution, misuse, or abuse of the outputs.
Recently, OpenAI also announced that they are planning to stop ChatGPT users from cheating on their homework or making social media bots by watermarking outputs produced by their models so that you can have a trace back to identify that they originated from ChatGPT. There are also recent research papers that have proposed frameworks for watermarking proprietary language models and already proven that the watermark can be embedded with negligible impact on the text quality in the outputs.
There are other challenges and security risks of generative AI models that need to be addressed. One is their vulnerability to training data extraction attacks. There is a potential risk that these models leak details about the data on which they've been trained. This point was raised in a research paper where they showed that if one prompts the GPT-2 language model with a particular prefix, it auto-completes a long block of text that contains sensitive and personally identifiable information, including contact details and the physical address of a particular person whose information was included in the model's training data.
There have been a lot of exciting developments in the field of optimizing and scaling down generative AI models, which will help pave the way for eventual on-device deployment. We're already seeing that these generative language models of different sizes and capacities can accomplish a variety of different tasks. So, while the larger models can pass college level exams or the bar exam, the smaller models can still achieve the ability of reading comprehension and logical deduction.
This is a great sign and helps us understand how to fine tune these models for business specific tasks or use cases and how we can optimize them for on-device. There's also a lot of promising evidence of running large scale AI with fewer parameters. For instance, the models like stable LM and Meta's Lama model have only around a few billion parameters.
This sounds like a lot, but these are vastly optimized models compared to the GPT models, which have hundreds of billions of parameters and have no hope in the world of running on smartphones. More recently, Web LLM is a project that brings large language models and chatbots to web browsers. So, everything is run inside the browser without any server support and it also leverages Web GPU acceleration.
Recently, Squeezebits also claim that they have optimized image generation models from stable diffusion to be able to run it on an Android phone, which is just astonishing. And why stop at only inference for on-device ML? We can also train and update these models locally without the data ever leaving the user's devices. Models can be fine-tuned to achieve better flexibility as well as offer personalization.
This concept can then extend to federated learning, which marries the advantages of on-device training with cloud training. So, you get the privacy benefit and the scale of on-device learning by keeping the data local closer to the user. And you get the benefit of learning from diverse data across users by having the cloud aggregate many locally trained models.
I'm so excited to see the proliferation of AI based services around us and the ability of running these lightweight personalized models locally on our phones will help us unlock the full potential. So, thank you all for listening. And with that, I'm happy to take any questions. Please feel free to drop any questions in the Q&A chat pod as well, and I can get to them offline too.
Okay, so we have a question from Sandra. What could be an example of a watermark in chat GPT? So, that's a great question, Sandra. One of the language models behind all of these chat GPT and prior technologies have a proposed watermarking technique, which the company isn't currently using, but the architecture behind these language models involve the use of transformers.
Which are composed of blocks that leverage tokens. And an example of a watermark is to select specific tokens from random set and softly promote the use of those specific tokens when generating the output. So, these watermarks would not be visible to a layman when chat GPT produces certain outputs. But if I'm someone who's a legal authority who would want to then investigate and trace it back, I can run reverse engineering using the token selection to be able to uncover and prove that this watermark originated from chat GPT.
But if I'm just a general user who's just going through a paragraph produced by chat GPT, it would be sort of masked from me. I have another question from Deborah. Can you explain a bit about the on-device and consolidated data with an example? Sure. So, you can think of it as each of us having smaller localized models with fewer parameters that learns to give us specific types of responses.
So, I might be having slightly different tolerance for bias or outputs of a language model compared to someone else. So, that would be really important. So, I think it would be very important. It would be very important to reflect my interests, my ethics, my values. Whereas, the larger models would get an aggregated version of all of our phones to reflect what general customers, you know, the mean average of customers would expect.
So, that helps to keep data local to me and a model that's personalized to my beliefs and my interests while also updating the larger models on server that reflects the aggregate data across all of the users without infringing privacy. I hope that helps answer your question. Thank you. And I think we're out of time. Thank you all for attending this session.
I really appreciate it. And please feel free to connect with me. All right. Have a great day, everyone.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
Ce presupune rularea deep learning pe un telefon
Priyanka Kulkarni de la Adobe împarte machine learning pe dispozitiv în trei provocări (dimensiune, eficiență și securitate) și tehnicile care răspund fiecăreia.
Pe scurt
Rularea AI pe dispozitiv în locul cloudului reduce costurile de server și lățime de bandă, elimină latența și păstrează datele utilizatorilor private, dar numai dacă modelul este mic, eficient și protejat. Priyanka Kulkarni, Senior Machine Learning Engineer la Adobe, descrie ML-ul pe dispozitiv ca pe un triatlon al memoriei, vitezei și confidențialității și prezintă arhitecturile, metodele de compresie, acceleratoarele hardware și tehnicile de watermarking care îl fac posibil.
Idei principale
Află cum să accelerezi drumul de la server la mobil pentru implementarea rețelelor neuronale de deep learning.
Înțelege riscurile și provocările implementării rețelelor neuronale pe dispozitiv.
Înțelege implicațiile de securitate ale implementării rețelelor neuronale pe dispozitiv și ce soluții și strategii să adopți pentru a-ți proteja proprietatea intelectuală.
Înțelege structura platformelor de implementare mobilă atât pentru Android, cât și pentru iOS.
Împinge limitele machine learning pe mobil.
De ce AI pleacă de pe server
Kulkarni pornește de la observația că mobilul a devenit o suprafață predominantă pentru interacțiunile cu AI, de la asistenți digitali la recunoaștere facială și realitate augmentată. Totuși, rețelele neuronale de ultimă generație sunt construite pentru centre de date pline de CPU-uri și GPU-uri. Dacă adaugi costul transferului datelor utilizatorilor în cloud și înapoi, factura crește rapid.
Machine learning pe dispozitiv elimină aceste costuri și le oferă utilizatorilor ceva mai bun: acces indiferent de conectivitate, rezultate în timp real și confidențialitate mai puternică. După cum spune ea: „Nimănui nu-i place întârzierea când datele sunt transmise în cloud, procesate acolo și apoi trimise înapoi.” (2:38) Deoarece datele nu trebuie trimise sau stocate pe un server, există și mai puține breșe pe care atacatorii le pot exploata.
Provocarea unu: dimensiunea și capacitatea modelului
Telefoanele au putere de calcul, baterie, memorie și spațiu de stocare limitate, iar boom-ul AI generativ a făcut modelele și mai mari. Kulkarni vorbește direct despre consecințe: „O aplicație de dimensiuni mari înseamnă sfârșitul pe mobil.” (3:50) Ea observă că un model tipic de deep learning are câteva sute de megaocteți și că acest lucru contează cel mai mult pe piețele emergente, unde telefoanele de gamă medie și joasă sunt majoritare. Potrivit sondajelor citate de vorbitoare, lipsa spațiului de stocare și consumul de baterie sunt cele mai frecvente motive pentru care oamenii dezinstalează aplicații. Concluzia ei: „Așadar, menținerea unei dimensiuni mici a modelului pe mobil și a unei latențe scăzute este cu adevărat nenegociabilă.” (4:38)
Alegerea arhitecturii este prima pârghie. Folosind grafice din cercetare, ea indică EfficientNet ca un model care câștigă multă acuratețe pentru o creștere mică a latenței și arată cum domeniul s-a îndepărtat de rețelele VGG cu foarte mulți parametri. Variantele MobileNet au dominat până acum pe mobil, în timp ce transformerele aduc straturi de atenție și o mai bună înțelegere a limbajului, dar sunt mai greu de rulat pe dispozitiv. Designurile hibride precum MobileViT încearcă să combine ce e mai bun din ambele.
Compresia este a doua pârghie: pruning-ul neuronilor redundanți, distilarea cunoștințelor dintr-un model profesor mare într-un model student mai mic și cuantizarea la o precizie mai mică. Deoarece această ajustare este manuală și anevoioasă, ea evidențiază căutarea arhitecturilor neuronale, care automatizează proiectarea rețelelor. Când un model trebuie să ruleze în mai multe medii, precum mobil, browser și web, un singur model impune un compromis: „Am putea implementa același model în toate, dar atunci am fi limitați de mediul cel mai constrâns și am ajunge să fim risipitori sau ineficienți în celelalte.” (8:45) Ea descrie Once-for-All, de la un grup de cercetare MIT, care antrenează o singură rețea mare și extrage subrețele specializate mai mici pentru fiecare țintă, o abordare pe care o consideră și mai bună pentru mediu decât căutările repetate.
Provocarea doi: eficiență, jank și acceleratoare
A doua provocare este exploatarea la maximum a unui hardware limitat și foarte variat, mai ales între numeroșii producători de Android. Când GPU-ului i se cere să randeze interfața și să ruleze inferența în același timp, utilizatorii văd cadre sacadate, fenomen numit jank. Instrumentele pentru dezvoltatori din iOS și Android ajută acum echipele să îl analizeze și să îl măsoare.
Kulkarni menționează acceleratoare hardware dincolo de CPU și GPU: XNNPACK în TensorFlow Lite pentru performanță CPU mai bună și modele cuantizate, Apple Neural Engine pentru operații precum convoluțiile și înmulțirile de matrice și Tensor Processing Unit de la Google. Nu toate straturile sunt suportate peste tot, așa că „trebuie să ne adaptăm modelele astfel încât straturile să fie compatibile cu acceleratoarele pe care intenționăm să le folosim.” (12:21) Echipele pot construi și sisteme care distribuie straturile între acceleratoare, lucru esențial când mai multe modele concurează pentru același dispozitiv.
Provocarea trei: securitate și watermarking
Fiecare model reprezintă mult timp, date și bani, iar livrarea lui pe dispozitivele utilizatorilor îl expune. „Când implementăm un model de deep learning la edge sau pe dispozitivele clienților, acesta este mult mai vulnerabil acolo decât atunci când este interogat prin API-uri în cloud.” (12:47) Apărările standard includ criptarea, obfuscarea și limitarea cererilor pentru a reduce atacurile adversariale.
Apoi trece la watermarking-ul rețelelor neuronale, un domeniu de cercetare de ultimă oră care încorporează într-un model semnale ascunse de proprietate sau backdoor-uri. Un watermark bun nu afectează acuratețea, nu manifestă alt comportament și rezistă încercărilor adversariale de eliminare. Ideea este extinsă la AI generativ, unde ar putea ajuta împotriva plagiatului, atribuirii greșite și utilizării abuzive. Ea menționează că OpenAI a anunțat planuri de a aplica watermark rezultatelor ChatGPT, precum și o lucrare de cercetare care arată că GPT-2 putea fi determinat prin prompturi să divulge informații personale din datele de antrenare. În sesiunea de întrebări, explică o tehnică propusă: favorizarea discretă a unor tokenuri alese dintr-un set aleatoriu, invizibilă pentru cititori, dar detectabilă de un investigator.
AI generativ și învățare federată pe dispozitiv
Kulkarni încheie cu progresele în micșorarea modelelor generative. Modele precum StableLM și LLaMA de la Meta au câteva miliarde de parametri, față de sute de miliarde pentru modelele GPT; WebLLM rulează modele de limbaj în browser folosind WebGPU; iar SqueezeBits afirmă că rulează generarea de imagini Stable Diffusion pe un telefon Android. Apoi merge mai departe: „Și de ce să ne oprim doar la inferență pentru ML pe dispozitiv? Putem și să antrenăm și să actualizăm aceste modele local, fără ca datele să părăsească vreodată dispozitivele utilizatorilor.” (17:06) Învățarea federată combină această personalizare locală și privată cu agregarea în cloud a numeroase modele antrenate local, astfel încât modelul comun învață de la utilizatori diverși fără a le colecta datele.
Urmărește prezentarea
„On-device ML: Artificial Intelligence in your pocket” de Priyanka Kulkarni, 22 de minute: https://www.womentech.net/video/device-ml-artificial-intelligence-in-your-pocket
Despre vorbitoare
Priyanka Kulkarni este Senior Machine Learning Engineer la Adobe, unde lucrează la inovații AI de nouă generație pentru dispozitive mobile și construiește rețele neuronale pentru implementare pe dispozitiv și la edge. În ultimii cinci ani a aplicat deep learning în antrenarea, compresia, optimizarea, protecția IP și implementarea pe mobil a modelelor pentru analiza și detecția imaginilor de documente și deține o diplomă de master de la Carnegie Mellon University, cu specializare în mobile și pervasive computing.
Întrebări la care răspunde prezentarea
De ce să rulezi machine learning pe dispozitiv și nu în cloud?
De ce este dimensiunea modelului o constrângere atât de critică pe mobil?
Ce este jank-ul și cum îl pot reduce echipele de ML pe dispozitiv?
Cum își poate proteja o companie un model după ce a fost implementat pe dispozitivul unui utilizator?
Cum ar putea funcționa un watermark într-un model de limbaj precum ChatGPT?
Redactat cu AI pe baza transcrierii prezentării. Revizuirea editorială este în așteptare.
Frameworks and ideas mentioned
Neural architecture search
Once-for-All
Network pruning
Knowledge distillation
Quantization
Neural network watermarking
Federated learning
Resources mentioned
TensorFlow Lite XNNPACK
Apple Neural Engine
Once-for-All (MIT)
WebLLM
Cite this talk
Priyanka Kulkarni. "On-device ML: Artificial Intelligence in your pocket." WomenTech Network, 2023. https://www.womentech.net/video/device-ml-artificial-intelligence-in-your-pocket