{"id":14483532,"url":"https://github.com/numerique-gouv/blocknote-llm","last_synced_at":"2025-06-13T03:39:16.676Z","repository":{"id":233077854,"uuid":"785730978","full_name":"numerique-gouv/blocknote-llm","owner":"numerique-gouv","description":"A proof of concept of what can be done with the BlockNote editor based on ProseMiror and an LLM running in the browser","archived":false,"fork":false,"pushed_at":"2024-09-24T01:02:18.000Z","size":7257,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-05T12:30:36.241Z","etag":null,"topics":["ai","blocknote","editor","llm","prosemirror","webllm","wysiwyg","wysiwyg-editor"],"latest_commit_sha":null,"homepage":"https://numerique-gouv.github.io/blocknote-llm/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numerique-gouv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-12T13:58:47.000Z","updated_at":"2024-11-27T08:52:54.000Z","dependencies_parsed_at":"2024-04-16T17:52:46.078Z","dependency_job_id":"a501a9e2-e276-4202-8bd4-53745e4f9297","html_url":"https://github.com/numerique-gouv/blocknote-llm","commit_stats":null,"previous_names":["numerique-gouv/blocknote-llm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerique-gouv%2Fblocknote-llm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerique-gouv%2Fblocknote-llm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerique-gouv%2Fblocknote-llm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerique-gouv%2Fblocknote-llm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numerique-gouv","download_url":"https://codeload.github.com/numerique-gouv/blocknote-llm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586093,"owners_count":20801026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","blocknote","editor","llm","prosemirror","webllm","wysiwyg","wysiwyg-editor"],"created_at":"2024-09-03T00:01:50.618Z","updated_at":"2025-04-01T04:41:57.472Z","avatar_url":"https://github.com/numerique-gouv.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# BlockNoteLLM\n\n[Demo App](https://numerique-gouv.github.io/blocknote-llm/)\n\n\u003c/div\u003e\n\n## Overview\n\nA proof of concept of what can be done with the BlockNote editor based on ProseMiror and an LLM running in the browser\n\n- Fully private = No data ever leaves your computer\n- Runs in the browser = No server needed and no install needed!\n- Works offline\n- Easy-to-use interface\n\nThis tool is built on top of [WebLLM](https://github.com/mlc-ai/web-llm), a package that brings language model inference directly onto web browsers with hardware acceleration.\n\n## System Requirements\n\nTo run this, you need a modern browser with support for WebGPU. According to [caniuse](https://caniuse.com/?search=WebGPU), WebGPU is supported on:\n\n- Google Chrome\n- Microsoft Edge\n- All Chronium-based browsers\n\nIt's also available in Firefox Nightly, but it needs to be enabled manually through the dom.webgpu.enabled flag. Safari on MacOS also has experimental support for WebGPU which can be enabled through the WebGPU experimental feature.\n\nIn addition to WebGPU support, you need to have enough available RAM on your device to run the model (~5,5Gb).\n\nYou can check if your browser or your device support WebGPU by visiting [webgpureport](https://webgpureport.org/).\n\n## Supported model\n\nWe use [Llama3](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct), a 8B language model. This model was developed by Meta, and it takes up 5.2 Gb of storage in the browser's cache.\n\nYou can directly use the compiled version of Llama3 for WebLLM, which follows the compilation process of [MLC](https://mlc.ai/). We chose to use the quantized model of Llama3 (q4f16) with the half precision model, because it has the best performance-to-memory usage ratio.\n\nYou can also use another model. To do that, you can compile your own model and weights with [MLC LLM](https://github.com/mlc-ai/mlc-llm). Then you just need to update [app-config](./src/app-config.ts) with:\n\n- The URL to model artifacts, such as weights and meta-data.\n- The URL to web assembly library (i.e. wasm file) that contains the executables to accelerate the model computations.\n- The name of the model.\n\nYou also need to change the custom prompt added before the user's text in the [prompt](./src/prompt.ts) file.\n\nIf you need further information, you can check the [MLC LLM documentation](https://llm.mlc.ai/docs/deploy/javascript.html) on how to add new model weights and libraries to WebLLM.\n\n**Disclaimer**: We use the chat version of Llama3, specifically fine-tuned for chat interactions rather than our specific use cases. Hence, you may encounter some limitations or inaccuracies in the response. Additionally, as with any LLM, it's possible to encounter hallucinations or inaccuracies in generated text.\n\n## Try it out\n\nYou can [try it here](https://numerique-gouv.github.io/blocknote-llm/). You can also run the project locally and contribute to improve the interface, speed up initial model loading time and fix bugs, by following these steps:\n\n### Prerequisite\n\n- NodeJS \u003e= 20 - https://nodejs.org/\n- NPM\n\n### Setup \u0026 Run The Project\n\nIf you're looking to make changes, run the development environment with live reload:\n\n```sh\n# Clone the repository\ngit clone https://github.com/numerique-gouv/blocknote-llm.git\n\n# Enter the project folder\ncd ./blocknote-llm\n\n# Install dependencies\nnpm install\n\n# Start the project for development\nnpm run dev\n```\n\n### Building the project for production\n\nTo compile the React code yourself, run:\n\n```sh\n# Compile and minify the project for publishing, outputs to `dist/`\nnpm run build\n\n# Build the project for publishing and preview it locally. Do not use this as a production server as it's not designed for it\nnpm run preview\n```\n\nThis repository has a workflow that automatically deploys the site to GitHub Pages whenever the main branch is modified\n\n## License\n\nThis work is released under the MIT License (see [LICENSE](./LICENSE)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumerique-gouv%2Fblocknote-llm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumerique-gouv%2Fblocknote-llm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumerique-gouv%2Fblocknote-llm/lists"}