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::$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_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::$_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::$_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::$onesignal_meta_box_present 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::$onesignal_send_notification 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::$onesignal_modify_title_and_content 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::$onesignal_notification_custom_heading 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::$onesignal_notification_custom_content 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_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::$_yoast_wpseo_wordproof_timestamp 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::$response_body 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

Deprecated: Creation of dynamic property Timber\Post::$_oembed_894dfbb5b0f4eceb37021222e2e7b4b1 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::$_oembed_time_894dfbb5b0f4eceb37021222e2e7b4b1 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::$_oembed_6140f0d3f0c9c292a192c51920bafcb6 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::$_oembed_time_6140f0d3f0c9c292a192c51920bafcb6 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
llamafile: Mozilla trasforma i pesi di un LLM in un eseguibile unico

llamafile: Mozilla trasforma i pesi di un LLM in un eseguibile unico

Mozilla presenta il progetto llamafile: obiettivo è consentire l'utilizzo dei modelli generativi (LLM) senza l'installazione dei vari requisiti software, su qualunque piattaforma, con lo stesso unico file eseguibile. Il sogno del build once anywhere, run anywhere finalmente si concretizza per chi si occupa di intelligenza artificiale.

Durante la fase di addestramento, i vari LLM (Large Language Model) – oggi comunemente utilizzati nelle applicazioni di intelligenza artificiale – apprendono una serie di parametri numerici essenziali per il loro corretto funzionamento. A questi parametri si dà il nome di pesi.

Un LLM è infatti costruito usando reti neurali profonde (deep neural network). Queste reti sono organizzate in strati (layer), ciascuno composto da nodi interconnessi. I pesi sono i parametri che regolano l'”intensità” e la direzione delle connessioni tra i nodi nei vari strati che compongono il modello.

Durante la fase di addestramento, al modello è dato in pasto un volume enorme di dati linguistici, come testi e frasi. L’obiettivo è quello di indurre il modello a stabilire le relazioni tra le parole e arrivare a comporre interconnessioni che affondano le loro radici in un approccio essenzialmente probabilistico.

I pesi di un LLM codificano la “conoscenza” acquisita durante l’addestramento. Possono quindi rappresentare le relazioni semantiche tra le parole, le regolarità grammaticali e altri aspetti complessi del linguaggio. Modificando i pesi, il modello può adattarsi a una vasta gamma di compiti linguistici.

Mozilla trasforma i pesi di un LLM in un file eseguibile con llamafile

Il gruppo di ricerca e sviluppo di Mozilla ha rilasciato e pubblicato su GitHub un progetto molto interessante. Si chiama llamafile: permette di gestire e trasformare i pesi dei LLM in eseguibili, così da renderli direttamente utilizzabili su diverse piattaforme. Con questo approccio, Mozilla facilita la distribuzione e l’esecuzione dei modelli senza la necessità di un’installazione complessa.

I pesi dei LLM sono generalmente memorizzati in un file da alcuni gigabyte nel formato GGUF. llamafile è presentato come uno strumento rivoluzionario che trasforma i pesi in un eseguibile binario utilizzabile su 6 differenti sistemi operativi (macOS, Windows, Linux, FreeBSD, OpenBSD e NetBSD): è sufficiente compilare il codice una volta sola.

Il “motore” che rende possibile la magia si chiama Cosmopolitan Libc: si tratta di un progetto open source che facilita la compilazione e l’esecuzione di programmi C su una vasta gamma di piattaforme e architetture. Ciò garantisce che il file binario generato sia compatibile con i vari sistemi operativi.

Le caratteristiche chiave di llamafile

Con la vorticosa evoluzione dei modelli linguistici e dei loro pesi a cui stiamo assistendo, llamafile fornisce una soluzione per mantenere l’usabilità e la coerenza nel tempo. Il progetto è rilasciato con la licenza Apache 2.0, incoraggiando il contributo della comunità e consentendo qualunque tipo di utilizzo.

L’obiettivo di llamafile è realizzare il sogno “build once anywhere, run anywhere” per gli sviluppatori di soluzioni basate sull’intelligenza artificiale, combinando llama.cpp con Cosmopolitan Libc in un unico framework. Llama.cpp è un’implementazione in C/C++ di Meta LLaMa, un LLM in grado di generare testo, elaborare traduzioni, riassunti e svolgere altre attività legate al linguaggio naturale.

La soluzione proposta da Mozilla nasce per garantire massima compatibilità microarchitetturale a livello di CPU. Inoltre, gli eseguibili llamafile possono essere utilizzati sia su piattaforma AMD64 che ARM64. Sul versante GPU, llamafile supporta sia schede NVidia che le soluzioni basate su Apple Silicon. I pesi del LLM possono essere incorporati direttamente nel llamafile, supportando la compressione PKZIP.

Esempi di llamafile già pronti per il download

Nella pagina GitHub di llamafile, Mozilla fornisce esempi di file binari che incorporano diversi modelli. Sono disponibili sia file sfruttabili da riga di comando che binari in grado di avviare un server Web locale per offrire un chatbot web-based.

Gli sviluppatori e i ricercatori possono ovviamente scaricare anche solo il software llamafile (senza pesi) dalla pagina di download o direttamente dalla finestra del terminale.

Credit immagine in apertura: iStock.com/BlackJack3D

Ti consigliamo anche

Link copiato negli appunti