{"id":3500,"date":"2024-01-17T12:04:26","date_gmt":"2024-01-17T11:04:26","guid":{"rendered":"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/"},"modified":"2024-01-17T12:04:26","modified_gmt":"2024-01-17T11:04:26","slug":"wasm-meetup-munich-a-wasm-new-year-trip-report","status":"publish","type":"post","link":"https:\/\/tomayac.com\/wordpress\/2024\/01\/17\/wasm-meetup-munich-a-wasm-new-year-trip-report\/","title":{"rendered":"Wasm meetup Munich: A Wasm New Year! trip report"},"content":{"rendered":"\n\t\t\t<h2 id=\"background\" tabindex=\"-1\">Background <a class=\"direct-link\" href=\"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/#background\" aria-hidden=\"true\">\ud83d\udd17<\/a><\/h2>\n<p>The WebAssembly meetup in Munich has a history that\n<a href=\"https:\/\/www.meetup.com\/en-US\/webassembly\/events\/?type=past\">reaches back to 2018<\/a>.\nAfter a long Covid-related hiatus and a lack of organizers to pick up the ball\nagain, <em>A Wasm New Year!<\/em> was the first event under the new organizing team.\nGoogle always had a strong presence at the events, so to continue the tradition\nI happily agreed to offer a talk at the first post-Covid meetup.<\/p>\n<p><img src=\"https:\/\/blog.tomayac.com\/images\/a-wasm-new-year.png\" alt=\"image\" \/><\/p>\n<h2 id=\"talks\" tabindex=\"-1\">Talks <a class=\"direct-link\" href=\"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/#talks\" aria-hidden=\"true\">\ud83d\udd17<\/a><\/h2>\n<h3 id=\"compiling-to-and-optimizing-wasm-with-binaryen\" tabindex=\"-1\">Compiling to and Optimizing Wasm with Binaryen <a class=\"direct-link\" href=\"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/#compiling-to-and-optimizing-wasm-with-binaryen\" aria-hidden=\"true\">\ud83d\udd17<\/a><\/h3>\n<p><strong>Speaker:<\/strong> Thomas Steiner<\/p>\n<p>In the first half of the talk, I showed at the example of a toy programming\nlanguage that I called ExampleScript how to write a compiler with Binaryen that\ncompiles the toy programming language to WebAssembly. In the second half, I then\ndemonstrated various optimization techniques in Binaryen and ways to use them\nfrom JavaScript with Binaryen.js and from the command line with tools like\n<code>wasm-opt<\/code> and <code>wasm-merge<\/code>.<\/p>\n<p><strong>Resources:<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/docs.google.com\/presentation\/d\/1W7CQK8E8iV0fkTBeJWOTysd-KzOLLGKaTVJWy4dZH6g\/edit?usp=drivesdk\">Compiling to and optimizing Wasm with Binaryen<\/a><\/li>\n<\/ul>\n<h3 id=\"llm-inference-with-webassembly\" tabindex=\"-1\">LLM inference with WebAssembly <a class=\"direct-link\" href=\"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/#llm-inference-with-webassembly\" aria-hidden=\"true\">\ud83d\udd17<\/a><\/h3>\n<p><strong>Speaker:<\/strong> <a href=\"https:\/\/www.linkedin.com\/in\/sven-pfennig\/\">Sven Pfennig<\/a><\/p>\n<p>In this talk, Sven showed three ways of how Wasm helps with interacting with\nlarge language models (LLM): in the browser, on the command line, and in the\ncloud. His running example was the task of creating a bedtime story from the PAW\nPatrol ecosystem for his daughter. First, the speaker demonstrated\n<a href=\"https:\/\/webllm.mlc.ai\/\">WebLLM<\/a> running variants of\n<a href=\"https:\/\/ai.meta.com\/llama\/\">Llama 2<\/a> and\n<a href=\"https:\/\/huggingface.co\/mistralai\/Mistral-7B-Instruct-v0.2\">Mistral-7B<\/a> right in\nthe browser. He mentioned the challenges of keeping large models cached, and\nalso showed how these models have trouble with seemingly simple tasks like\ncreating a list of the\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/PAW_Patrol#PAW_Patrol\">PAW Patrol members<\/a>, where\nthe model would plain hallucinate a member that never existed. Second, Sven\nshowed how to use the\n<a href=\"https:\/\/www.secondstate.io\/articles\/run-llm-sh\/\"><code>run-llm.sh<\/code> script<\/a> to get an\nLLM running on-device with <a href=\"https:\/\/wasmedge.org\/\">WasmEdge<\/a>. He noted the\nusefulness of this approach to mock an OpenAI API response due to the\ncompatibility of the responses. Finally, he showed\n<a href=\"https:\/\/www.fermyon.com\/spin\">Fermyon's Spin<\/a> solution to\n<a href=\"https:\/\/developer.fermyon.com\/spin\/index\">create serverless WebAssembly apps<\/a>,\nrun them locally, and finally deploy them to the\n<a href=\"https:\/\/developer.fermyon.com\/cloud\/index\">Fermyon cloud<\/a>.<\/p>\n<p><strong>Resources:<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/webllm.mlc.ai\/\">WebLLM<\/a><\/li>\n<li><a href=\"https:\/\/www.secondstate.io\/articles\/run-llm-sh\/\"><code>run-llm.sh<\/code> script<\/a><\/li>\n<li><a href=\"https:\/\/www.fermyon.com\/spin\">Fermyon Spin<\/a><\/li>\n<\/ul>\n<h1 id=\"observations\" tabindex=\"-1\">Observations <a class=\"direct-link\" href=\"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/#observations\" aria-hidden=\"true\">\ud83d\udd17<\/a><\/h1>\n<p>There was huge interest for Wasm on the server. People were particularly curious\nabout\n<a href=\"https:\/\/github.com\/bytecodealliance\/wasmtime\/blob\/main\/docs\/WASI-intro.md\">WASI<\/a>,\nthe WebAssembly System Interface. It's an API in the process of standardization\nthat provides access to several operating-system-like features, including files\nand filesystems, Berkeley sockets, clocks, and random numbers. (There's also a\nproposal for <a href=\"https:\/\/github.com\/WebAssembly\/wasi-nn\">wasi-nn<\/a>, a WASI API for\nperforming ML inference modeled closely after\n<a href=\"https:\/\/webmachinelearning.github.io\/webnn-intro\/\">WebNN<\/a>.)<\/p>\n<p>The company that hosted the meetup,\n<a href=\"https:\/\/www.reply.com\/liquid-reply\/en\/\">Liquid Reply<\/a>, is pitching WebAssembly\nas a solution for creating production-grade Wasm apps on Kubernetes and hosting\na workshop titled\n<a href=\"https:\/\/2024.wasmio.tech\/sessions\/create-production-grade-wasm-applications-on-kubernetes-workshop\/\">Create Production-Grade Wasm Applications on Kubernetes<\/a>\nat the upcoming <a href=\"https:\/\/2024.wasmio.tech\/\">Wasm I\/O conference<\/a> in March 2024\n(where Thomas Nattestad and I are going to present on\n<a href=\"https:\/\/2024.wasmio.tech\/sessions\/webassembly-at-google\/\">WebAssembly at Google<\/a>,\nalongside with Kevin Moore, who's going to present\n<a href=\"https:\/\/2024.wasmio.tech\/sessions\/flutter-dart-and-wasm-shipping-a-new-model-for-web-applications\/\">Flutter, Dart, and WASM: Shipping a new model for Web applications<\/a>).<\/p>\n<p>I also got a fair amount of questions on\n<a href=\"https:\/\/github.com\/WebAssembly\/gc\">WasmGC<\/a> and what it means for compiling new\nprogramming languages to Wasm. The strategy of writing a higher-level article\n(<a href=\"https:\/\/developer.chrome.com\/blog\/wasmgc\">WebAssembly Garbage Collection (WasmGC) now enabled by default in Chrome<\/a>)\nand a lower-level article\n(<a href=\"https:\/\/v8.dev\/blog\/wasm-gc-porting\">A new way to bring garbage collected programming languages efficiently to WebAssembly<\/a>)\nreally paid off and I could point developers at either of the two, dependent on\nhow deep they wanted to go.<\/p>\n\n\t\t\t<p>\n\t\t\t\t<img alt=\"Thomas Steiner\" width=\"32\" height=\"32\" src=\"https:\/\/blog.tomayac.com\/feed.php?dl=https%3A%2F%2Fblog.tomayac.com%2F2024%2F01%2F17%2Fa-wasm-new-year%2F&dp=%2F2024%2F01%2F17%2Fa-wasm-new-year%2F&dt=Wasm%20meetup%20Munich%3A%20A%20Wasm%20New%20Year!%20trip%20report\" alt=\"\">\n\t\t\t\t<br\/>This post appeared first on <a href=\"https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/\">https:\/\/blog.tomayac.com\/2024\/01\/17\/a-wasm-new-year\/<\/a>.\n\t\t\t<\/p>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\t\t\tBackground \ud83d\udd17<br \/>\nThe WebAssembly meetup in Munich has a history that<br \/>\nreaches back to 2018.<br \/>\nAfter a long Covid-related hiatus and a lack of organizers to pick up the ball<br \/>\nagain, A Wasm New Year! was the first event under the new organizing team.<br \/>\nGoogle &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"intlwemo_wallet_address":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-3500","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts\/3500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3500"}],"version-history":[{"count":1,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts\/3500\/revisions"}],"predecessor-version":[{"id":3501,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/posts\/3500\/revisions\/3501"}],"wp:attachment":[{"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomayac.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}