{"id":43867,"date":"2024-06-25T16:57:23","date_gmt":"2024-06-25T20:57:23","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=43867"},"modified":"2024-06-25T16:57:23","modified_gmt":"2024-06-25T20:57:23","slug":"llama-ttf","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/06\/25\/llama-ttf\/","title":{"rendered":"llama.ttf"},"content":{"rendered":"<p><a href=\"https:\/\/fuglede.github.io\/llama.ttf\/\">S&oslash;ren Fuglede J&oslash;rgensen<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=40766791\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/fuglede.github.io\/llama.ttf\/\"><p><tt>llama.ttf<\/tt> is a font file which is also a large language model and an inference engine for that model.<\/p><p>[&#8230;]<\/p><p>The font shaping engine <a href=\"https:\/\/en.wikipedia.org\/wiki\/HarfBuzz\">HarfBuzz<\/a>, used in applications such as Firefox and Chrome,\n        comes with a <a href=\"https:\/\/github.com\/harfbuzz\/harfbuzz\/blob\/main\/docs\/wasm-shaper.md\">Wasm shaper<\/a> allowing arbitrary code to be\n        used to &ldquo;shape&rdquo; text.<\/p><p>In particular, this &ldquo;arbitrary&rdquo; code could in principle be an entire LLM inference engine with trained parameters bundled inside, relying on treating text containing magic symbols for fake &ldquo;ligatures&rdquo; to initialize the LLM and use it to generate text.<\/p><p>[&#8230;]<\/p><p>[You can] get text generation in <i>any<\/i>\n        Wasm-enabled HarfBuzz-based application; your favorite text editor\/email client\/whatever without having to wait for the vendor to include\n        the &ldquo;Copilot&rdquo;-like features that everyone is rushing to implement these days. And everything runs\n        completely locally.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>S&oslash;ren Fuglede J&oslash;rgensen (via Hacker News): llama.ttf is a font file which is also a large language model and an inference engine for that model.[&#8230;]The font shaping engine HarfBuzz, used in applications such as Firefox and Chrome, comes with a Wasm shaper allowing arbitrary code to be used to &ldquo;shape&rdquo; text.In particular, this &ldquo;arbitrary&rdquo; code [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-06-25T20:57:26Z","apple_news_api_id":"dc94524b-ea4b-41e9-ba45-27579ec96416","apple_news_api_modified_at":"2024-06-25T20:57:26Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A3JRSS-pLQem6RSdXnslkFg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1351,133,2616,2427,71,1231],"class_list":["post-43867","post","type-post","status-publish","format-standard","hentry","category-technology","tag-artificial-intelligence","tag-font","tag-fun-hack","tag-llama","tag-programming","tag-webassembly"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=43867"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43867\/revisions"}],"predecessor-version":[{"id":43868,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43867\/revisions\/43868"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=43867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=43867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=43867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}