Intel·ligència artificial Google LLM local DiffusionGemma 16 GB VRAM Gemma Models de difusió Homelab

DiffusionGemma en un PC amb 16 GB de VRAM: velocitat, raonament i límits del nou LLM local

Luke’s Dev Lab prova DiffusionGemma en un ordinador local amb 16 GB de VRAM. El model genera text amb difusió i promet més velocitat, però el guany depèn del maquinari i del tipus de càrrega.

Els models de llenguatge acostumen a escriure d’esquerra a dreta: generen un token, l’afegeixen al context i calculen el següent. DiffusionGemma proposa una via diferent. En comptes de construir la resposta estrictament en aquest ordre, comença amb una seqüència emmascarada i la va refinant en diversos passos, de manera semblant a la difusió utilitzada en generació d’imatges.

Luke’s Dev Lab fa una primera prova del model de Google en un PC local amb 16 GB de VRAM i 32 GB de RAM DDR4. L’objectiu no és presentar un benchmark exhaustiu, sinó veure si la nova tècnica és pràctica en maquinari domèstic, com respon a preguntes de raonament i què passa quan se li demana simular les decisions d’un petit agent.

Com genera text un model de difusió

Un model autoregressiu no pot produir el token número cent abans d’haver calculat els noranta-nou anteriors. La generació per difusió pot predir i revisar diverses posicions dins d’una mateixa seqüència. A cada pas substitueix part de les màscares per candidats i corregeix el conjunt fins a arribar a una resposta llegible.

Aquesta estructura obre la porta a més paral·lelisme. Una GPU pot treballar sobre molts tokens alhora en lloc d’esperar una cadena completament seqüencial. Google afirma que DiffusionGemma pot arribar a generar text fins a quatre vegades més ràpid en GPU dedicades en determinades condicions.

«Fins a» és una part important de l’afirmació. El rendiment depèn de la quantització, la longitud de la resposta, el nombre de passos de difusió, el programari d’inferència i la capacitat del maquinari. No totes les consultes ni totes les GPU obtindran el mateix avantatge.

Un model de 26.000 milions de paràmetres que activa una fracció

DiffusionGemma 26B-A4B és una barreja d’experts. Té aproximadament 26.000 milions de paràmetres totals, però n’activa prop de 3.800 milions per token. Aquesta arquitectura permet ampliar el coneixement representat sense pagar tot el cost de càlcul a cada pas.

La versió instruct està preparada per seguir indicacions i es distribueix amb llicència Apache 2.0. Google assenyala que una versió quantitzada pot cabre en menys de 18 GB de VRAM. Luke utilitza la conversió GGUF Q4_K_M d’Unsloth. Com que no cap sencera en els 16 GB de memòria gràfica, descarrega una part de les capes a la RAM DDR4 del sistema.

La memòria necessària no és només el pes del model. També compten la memòria cau, els búfers, la longitud del context i el backend. Per això dues quantitzacions amb una mida de fitxer semblant poden comportar-se de manera diferent.

La prova local amb 16 GB de VRAM

La compatibilitat encara és primerenca. La versió provada necessita compilar una branca específica de llama.cpp i utilitzar paràmetres recomanats per a aquest patró de generació. Tampoc exposa l’API compatible amb OpenAI que Luke fa servir en el seu banc de proves, de manera que no pot executar la bateria habitual ni comparar els resultats en les mateixes condicions.

La prova serveix per observar el temps de resposta i el patró visual de generació: el text no apareix com una frase que creix de manera lineal, sinó que els caràcters emergeixen en diferents punts i es van completant. En una de les preguntes habituals de raonament, sobre persones que han de travessar un pont, la resposta queda acabada en uns 27 segons tot i que una part del model treballa des de la RAM.

Aquest comportament pot resultar estrany en una interfície de xat. En un model autoregressiu, l’usuari pot començar a llegir mentre arriba la resta. Amb difusió, la latència fins a veure una part estable i el nombre total de tokens per segon són mètriques diferents. Una generació global més ràpida no sempre se sent més immediata.

La prova també mostra que el model es pot executar en maquinari accessible, però 16 GB no el converteixen en una eina lleugera. La resta del sistema, la velocitat de la RAM i la transferència entre CPU i GPU poden limitar-lo si alguna capa no cap completament a la targeta.

Raonament: velocitat no és el mateix que encert

El vídeo sotmet DiffusionGemma a dues preguntes senzilles de raonament. Luke considera la velocitat molt impressionant i veu capacitat de raonament, però insisteix que els resultats no són comparables amb els seus benchmarks normals. Uns pocs prompts són sensibles a la formulació, a la temperatura i a la quantització.

La gràfica de Google que comenta el vídeo situa el DiffusionGemma de 26B per sota del Gemma autoregressiu de 12B en qualitat. El mateix material oficial presenta el model com a experimental i prioritza la velocitat. Per a tasques on l’encert sigui el criteri principal, Luke recomana continuar utilitzant els models estàndard.

La difusió tampoc resol automàticament les al·lucinacions. El model continua predient una resposta probable a partir del seu entrenament. Que pugui revisar diversos tokens durant el procés pot ajudar a mantenir coherència global, però una explicació segura i ben escrita encara pot ser falsa.

Per a una aplicació real convé avaluar un conjunt de casos representatius, comprovar les respostes amb dades externes i mesurar tant qualitat com velocitat. Una xifra alta de tokens per segon té poc valor si la tasca necessita més reintents o verificacions.

Agent simulat i ús d’eines

Luke també prova una situació d’«agència simulada»: el model rep una llista d’eines i ha de dir quina cridaria, però no n’executa cap de veritat. En tres preguntes selecciona una eina quan correspon i supera una prova de contenció en què no n’havia de cridar cap. És un senyal positiu, no una avaluació completa d’un agent.

Els agents necessiten més que un bon text. Cal un format estable per a les crides d’eina, validació d’arguments, control de permisos, gestió d’errors i un bucle que retorni els resultats al model. La velocitat de DiffusionGemma pot ser atractiva quan hi ha moltes iteracions, però la fiabilitat del format i la qualitat de cada decisió són igualment importants.

En un ordinador local hi ha un avantatge addicional: les dades poden quedar dins de la màquina. Això pot interessar per a codi privat, documents sensibles o un homelab sense connexió permanent, sempre que l’aplicació i les dependències també es configurin de manera segura.

On té sentit i quins límits conserva

Google presenta DiffusionGemma com un model experimental. Pot ser especialment interessant per a ús local i baixa concurrència, on la generació paral·lela en una GPU disponible redueix l’espera. En serveis amb moltes peticions simultànies, els models autoregressius ja poden agrupar consultes de manera molt eficient i l’avantatge pot reduir-se o fins i tot augmentar el cost.

La mateixa Google manté els Gemma autoregressius com l’opció estàndard per a moltes càrregues de producció. DiffusionGemma és una exploració prometedora, no un reemplaçament universal.

La primera impressió del vídeo és valuosa perquè trasllada la proposta del laboratori a un PC de 16 GB i mostra tant la velocitat com les dificultats d’integració actuals. Luke vol repetir la prova quan llama.cpp i una API compatible li permetin executar el benchmark complet.

La tecnologia pot accelerar la generació i obrir una nova família de models locals, però encara cal comparar qualitat, consum, compatibilitat i experiència d’usuari. La novetat no és només que escrigui més de pressa: és que qüestiona l’ordre en què un LLM ha d’aprendre a escriure.

Contrast i context

Fonts consultades

3 fonts
  1. 01
  2. 02
  3. 03

Font de treball

Transcripció amb marques de temps

10 fragments
Consulta la transcripció
  1. 0:00 , obre el vídeo en una pestanya nova

    Hey, welcome to Luke's Dev Lab, my name's Luke, and I'm here to help you cut through the hype and find out what AI can actually do for you. And in today's video I want to look at DeFusion Gemma, which was just dropped by Google. So diffusion Gemma is a new way of generating tokens, which Google claims four times faster than regular text generation. So maybe you've heard the word diffusion before in this space, probably from stable diffusion. So this is where essentially the technique is very similar to what's done with stable diffusion. So a bunch of noise is created and then from that noise we keep stepping over it until we finally get the output image. That's obviously the very simplified explanation. And this is kind of working same with diffusion jemma so instead of generating all the tokens sequentially it's basically just going to blast out a bunch of random tokens and then it's going to iterate over it and put all the correct tokens in place which is very interesting to watch as we'll see you soon. So we're just going to cover a little bit first so interestingly here with this graph they do show it being

  2. 0:44 , obre el vídeo en una pestanya nova

    obviously very fast, but if you look closely you can see that this diffusion version of the 26th beam model actually sits below the 12th B version in terms of intelligence. So that's quite interesting. That feels like quite a sacrifice in my opinion, but we'll see when we test it. So they talk about the speed and they do mention its experimental. So because it prioritizes speed, quality is lower than the standard models. So the quality is of the utmost importance.

  3. 1:29 , obre el vídeo en una pestanya nova

    You should still use the standard models. But of course, this technology is evolving. So hopefully we can get to the point where the diffusion version can be as intelligent as the regular text generation version. This would be awesome. So there are lots of examples here. They explain how it works. Obviously, I'll link to this blog post down below and then they tell you how to get started and they do have a GGUF version by Unsloff which means we can try and learn a CPP. So this is the version we're going to be looking out today. This is the GGUF conversion from Unsloff. There's only one for each quantization at the moment. So we're going to go ahead and look at the Q4KM. I'll also link this page below because this does not work out the box with learn a CPP, but there's some instructions.

  4. 2:13 , obre el vídeo en una pestanya nova

    you have to build a specific branch of LMSEPP to get this work in. And then they also recommend some parameters and ways to use this because it's obviously slightly different to a regular text generation model. So, get this installed and we'll see how it is. And just to show you the hardware will be running this on, so I've got my GPU with 16 gigs of VRAM and then we are going to have to offload to some of my DDR4 system memory because I cannot fit the 4-bit quantization that Unslawful is providing entirely on VRAM. So we're gonna have a little play around with this model. Unfortunately, I can't do my full test suite right now because my tests are not currently compatible. Like, it's not exposing an open AI compatible API, for example, which is what I'm using to hook up my testing to the models. So we're gonna do some rudimentary tests. This is just more of a first look at the moment. But I've got some of our familiar tests in here, but again, they're not comparable. Some of these are still working progress.

  5. 2:58 , obre el vídeo en una pestanya nova

    But certainly one you'll be familiar with would be the reasoning ones. So the reasoning Q1 is going to be the first question that we normally ask which would be the one about people crossing the bridge. So again, this video I wouldn't say too much about the intelligence at the moment. I'm kind of running these more of curiosity. So if we run this test, let me wait for it to get set. So here we go. So there, this is the token generation.

  6. 3:42 , obre el vídeo en una pestanya nova

    to give us an answer to the question. I had to think this is really interesting watching that work like this. It's like rather than watching someone type. It's weird watching all the characters just appear around the screen. And I'll leave this running. I'm not going to speed up. So yeah, there we go. It's done. So it was done in 27,000 milliseconds. So if you've seen my videos before, like this. 26 B A 4 B model from Google would take a long time to think through to get to the answer of this question and that's when I'm running the model entirely in V-RAM. This I can't even fit entirely in my V-RAM so it's slower so it's very interesting to see the way it works and yeah the speed is very very impressive it's exciting stuff it's do one more so I'm really intrigued to see if this this new way of doing the generation

  7. 4:27 , obre el vídeo en una pestanya nova

    If you can catch up with intelligence, then this would be really exciting to see. And you can see the Fink Improcessors is very different now, because it's not just putting out tokens one after the other to go for its full process. It just goes through iterations of what the whole thing should look like, essentially. And that's it done. So yeah, very interesting stuff.

  8. 5:11 , obre el vídeo en una pestanya nova

    I've also got like a kind of a fake smoke test of the agency benchmark here. So the model isn't actually calling tools in this test, but it's basically simulating what tools it would cool. So it's told what tools it has access to and then it gives the answer of what tool it would cool. So we can do a little mini agency test here. So we're just we're gonna ask a few questions of it. And if you've seen my agency benchmark before these questions. should be familiar. So it's just gonna do the final of the free now. And there it is. So, just go back up to the top. So, yeah, we asked the question, it tells us what tool it wants to use. So, it's still got the intelligence there. This second one is a restraint test, not to call it tool. It doesn't be not called a tool. So, yeah, the intelligence is still there and the speed is amazing.

  9. 5:56 , obre el vídeo en una pestanya nova

    So I know this video is a bit of a short one, but I just kind of wanted to get my thoughts out on this and also I want to know what you guys think about it. I think personally, I think this is like really interesting technology here and I'm looking forward to seeing if they can improve the quality on this, then this could be a really good viable option. And then I guess also if you are willing to sacrifice some quality for speed. This is a huge jump in speed. So next for me and on this would be I am...

  10. 6:40 , obre el vídeo en una pestanya nova

    really looking forward to getting better compatibility with Lama CPP and the Open AI API so I can integrate this properly with my testing. So as soon as that's possible, I will definitely come back with a proper video reviewing this model and running it through my benchmark in speed. So what do you guys think? Let me know down below. So thanks for watching the video. I appreciate it. Give it a like if you like the content and subscribe if you want to see more of it and I'll see you in the next one. Bye.