Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$os_meta is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_previous_publish_date is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_notification_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Google TurboQuant promette AI più veloce e leggera: ecco come

Google TurboQuant promette AI più veloce e leggera: ecco come

TurboQuant è un algoritmo di Google che, durante l'utilizzo dei modelli AI più avanzati e di più grandi dimensioni, aiuta a ridurre la memoria occupata aumentando le prestazioni senza perdita di accuratezza.

La gestione della memoria rappresenta uno dei principali limiti operativi dei Large Language Models (LLM). Durante la fase di inferenza (cioè il momento in cui il modello AI genera l’output a valle del prompt dell’utente), ogni nuovo token prodotto deve accedere a strutture dati interne che aumentano in modo proporzionale alla lunghezza del contesto, ossia alla quantità di testo già elaborato. Ciò comporta un consumo di memoria crescente che, nei sistemi più avanzati, può arrivare a occupare anche decine di gigabyte.

La cosiddetta KV cache – introdotta con i transformer decoder-only – consente di riutilizzare chiavi e valori calcolati nei passaggi precedenti, ma genera un costo crescente sia in termini di memoria che di banda.

Negli anni, diversi approcci hanno cercato di ridurre l’utilizzo di memoria attraverso tecniche di compressione. Tuttavia, molti metodi tradizionali sacrificano precisione oppure richiedono fasi di addestramento aggiuntive. Google Research ha proposto TurboQuant, una soluzione che punta a comprimere drasticamente la memoria senza peggiorare la qualità delle risposte, mantenendo un equilibrio tra efficienza e affidabilità.

Perché la memoria diventa un limite

Quando un modello genera testo, deve confrontare ogni nuova parola con tutte quelle già elaborate. Tale processo, come abbiamo visto nell’articolo sull’intelligenza artificiale spiegata facile, si basa sul meccanismo di attenzione, che utilizza vettori numerici memorizzati nella cache. Più il testo è lungo, più questi vettori aumentano e più memoria serve per conservarli e consultarli.

Su hardware moderno, come le GPU utilizzate per l’inferenza, il problema non è solo lo spazio occupato, ma anche la velocità con cui i dati vengono letti e scritti. Una cache troppo grande rallenta tutto il sistema, anche se la potenza di calcolo sarebbe sufficiente.

Le soluzioni tradizionali comprimono i dati riducendo il numero di bit usati per rappresentarli. Questo approccio, noto come quantizzazione, permette di risparmiare memoria ma introduce errori numerici. Nei modelli linguistici, anche piccole imprecisioni possono influenzare il risultato finale.

Alcuni metodi più avanzati utilizzano tabelle di riferimento per rappresentare gruppi di valori simili, ma richiedono tempo per essere costruiti e non sempre funzionano bene su dati diversi da quelli usati durante l’addestramento.

Come funziona Google TurboQuant

TurboQuant, come spiegato dagli ingegneri di Google Research, introduce un metodo diverso, che non dipende dai dati utilizzati dal modello.

L’idea di base consiste nel trasformare i vettori numerici in modo da renderli più semplici da comprimere. Dopo questa trasformazione, ogni valore può essere ridotto a pochi bit senza perdere informazioni rilevanti.

Il sistema applica prima una rotazione matematica ai dati, così da distribuirli in modo più uniforme. Questo passaggio rende più efficace la compressione successiva, che utilizza una forma ottimizzata di quantizzazione scalare.

Una delle difficoltà principali della compressione è mantenere la precisione nei calcoli. TurboQuant affronta il problema introducendo una tecnica chiamata Quantized Johnson-Lindenstrauss, che corregge gli errori residui con un numero minimo di informazioni aggiuntive.

In pratica, il sistema aggiunge un piccolo correttivo che permette di ricostruire con maggiore precisione i risultati dei calcoli. Ciò consente di mantenere invariata la qualità delle risposte, anche con una forte riduzione della memoria disponibile.

Un approccio geometrico alla compressione

Un altro elemento interessante è l’uso di PolarQuant, che rappresenta i vettori in modo diverso rispetto alla forma tradizionale. Invece di descrivere ogni punto con coordinate standard, il metodo separa intensità e direzione. È una scelta che permette di comprimere meglio le informazioni più importanti, riducendo ulteriormente lo spazio necessario senza compromettere il funzionamento del modello.

I test mostrano che TurboQuant può ridurre la memoria della cache fino a circa 6 volte rispetto ai metodi standard. Allo stesso tempo, la velocità di generazione può aumentare sensibilmente, perché il sistema deve trasferire meno dati tra memoria e processore.

Un aspetto rilevante è che la tecnica individuata da Google non richiede modifiche al modello né un nuovo addestramento. Può essere applicata direttamente durante l’uso, rendendo più semplice l’integrazione nei sistemi già esistenti.

Cosa cambia per l’uso dei modelli AI

Ridurre il consumo di memoria significa rendere i modelli più accessibili. Sistemi che prima richiedevano hardware costoso, possono funzionare su infrastrutture più leggere. Inoltre, diventa più semplice gestire più utenti contemporaneamente senza rallentamenti.

Resta comunque un limite naturale: comprimere i dati comporta sempre un certo margine di errore. TurboQuant riduce questo effetto al minimo, ma in applicazioni molto sensibili potrebbe essere necessario valutare attentamente il livello di compressione applicato.

Il lavoro di Google dimostra che l’efficienza non dipende solo dalla dimensione dei modelli, ma anche da come sono gestite le informazioni durante l’inferenza.

Ti consigliamo anche

Link copiato negli appunti