{"id":27797953,"url":"https://github.com/davzoku/cria","last_synced_at":"2025-04-30T22:54:39.483Z","repository":{"id":188824666,"uuid":"675308199","full_name":"davzoku/cria","owner":"davzoku","description":"An end-to-end LLM app prototype based on Llama 2","archived":false,"fork":false,"pushed_at":"2024-02-14T13:12:05.000Z","size":8810,"stargazers_count":6,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T12:06:21.960Z","etag":null,"topics":["artificial-intelligence","chatbot","llama2","llm","nextjs","transformers"],"latest_commit_sha":null,"homepage":"https://chat.walterteng.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davzoku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"davzoku","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-08-06T13:49:29.000Z","updated_at":"2024-03-05T04:51:57.000Z","dependencies_parsed_at":"2023-12-30T09:30:03.785Z","dependency_job_id":"38780aa1-d740-467a-8835-c839a0e43c3f","html_url":"https://github.com/davzoku/cria","commit_stats":null,"previous_names":["davzoku/cria"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davzoku%2Fcria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davzoku%2Fcria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davzoku%2Fcria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davzoku%2Fcria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davzoku","download_url":"https://codeload.github.com/davzoku/cria/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251630234,"owners_count":21618317,"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":["artificial-intelligence","chatbot","llama2","llm","nextjs","transformers"],"created_at":"2025-04-30T22:54:38.656Z","updated_at":"2025-04-30T22:54:39.475Z","avatar_url":"https://github.com/davzoku.png","language":"TypeScript","funding_links":["https://ko-fi.com/davzoku"],"categories":[],"sub_categories":[],"readme":"# 🍼🦙 CRIA\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/a9502b61-04e1-4202-be27-e5bd304321ae/deploy-status)](https://app.netlify.com/sites/cria-chat/deploys)\n\n💡 [Article](https://walterteng.com/cria) | 💻 [HuggingFace](https://huggingface.co/davzoku/cria-llama2-7b-v1.3) | 📔 Colab [1](https://colab.research.google.com/drive/1rYTs3qWJerrYwihf1j0f00cnzzcpAfYe),[2](https://colab.research.google.com/drive/1Wjs2I1VHjs6zT_GE42iEXsLtYh6VqiJU)\n\nWelcome to CRIA, a LLM model series based on [Llama 2-7B](https://github.com/facebookresearch/llama).\n\n## What is CRIA?\n\n\u003e **Hint:** krē-ə plural crias; a baby llama, alpaca, vicuña, or guanaco.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/icon-512x512.png\" width=\"300\" height=\"300\" alt=\"Cria Logo\"\u003e \u003cbr\u003e\n\u003c/p\u003e\n\nWith ChatGPT's help, CRIA also stands for **\"Crafting a Rapid prototype of an Intelligent llm App using open source resources\"**. This encapsulates the objective of this project perfectly.\n\nAdditionally, akin to a baby llama in nature, CRIA pays homage to its foundational model, Meta's Llama-2 7B Large Language Model.\n\n## Features\n\n- Demostration of instruction-tuning on latest open source LLM using a custom dataset on a _free colab instance_.\n- Utilized FastAPI for efficient model serving and inference deployment.\n  - Supports real-time with Server-Sent Events (SSE) for a seamless chat experience.\n- Enjoy a modern front-end built with Next.js and Chakra UI.\n- Supports both local deployment, and cloud deployment. (Coming Soon!)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=OTsBGFcVc8k\"\u003e\u003cimg src=\"assets/youtube-demo.jpeg\" alt=\"Frontend\"\u003e\u003c/a\u003e\u003cbr\u003e\n  \u003cb\u003eDemo:\u003c/b\u003e Leveraging on open source resources such as \u003ca href=\"https://github.com/horizon-ui/chatgpt-ai-template\"\u003eHorizon AI Template\u003c/a\u003e\n\u003c/p\u003e\n\n## What You'll Find Here\n\nIn this repository, you'll find:\n\n**Code:** Dive into the technical details of our chatbot implementation, including the training process, API server implementation, the integration of Next.js for the user interface, and more.\n\n**Documentation:** Detailed documentation to help you understand and replicate the CRIA setup, from model selection to deployment considerations.\n\n**Demo:** Access a live demo showcasing CRIA in action.\n\n## Model History\n\n| HuggingFace Model                                                                                                                                                   | Model Type    | Base Model                                                                                    | Dataset                                                                                                                | Colab                                                                                                                                                                                                                                                                                                           | Status       |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |\n| [cria-llama2-7b-v1.3](https://huggingface.co/davzoku/cria-llama2-7b-v1.3), \u003cbr\u003e [cria-llama2-7b-v1.3_peft](https://huggingface.co/davzoku/cria-llama2-7b-v1.3_peft) | Merged / PEFT | [NousResearch/Llama-2-7b-chat-hf](https://huggingface.co/NousResearch/Llama-2-7b-chat-hf)     | [mlabonne/CodeLlama-2-20k](https://huggingface.co/datasets/mlabonne/CodeLlama-2-20k)                                   | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1rYTs3qWJerrYwihf1j0f00cnzzcpAfYe) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1Wjs2I1VHjs6zT_GE42iEXsLtYh6VqiJU) | Latest       |\n| cria-llama2-7b-v1.1, cria-llama2-7b-v1.2                                                                                                                            | Merged / PEFT | [TinyPixel/Llama-2-7B-bf16-sharded](https://huggingface.co/TinyPixel/Llama-2-7B-bf16-sharded) | [n3rd0/DreamBook_Guanaco_Format](https://huggingface.co/datasets/n3rd0/DreamBook_Guanaco_Format)                       | N.A.                                                                                                                                                                                                                                                                                                            | Experimental |\n| cria-llama2-7b-v1.0                                                                                                                                                 | PEFT          | [TinyPixel/Llama-2-7B-bf16-sharded](https://huggingface.co/TinyPixel/Llama-2-7B-bf16-sharded) | [Elliot4AI/dolly-15k-chinese-guanacoformat](https://huggingface.co/datasets/Elliot4AI/dolly-15k-chinese-guanacoformat) | N.A.                                                                                                                                                                                                                                                                                                            | Experimental |\n\n## Documentation\n\n### Setup\n\nThe instructions to run the various components, such as the API server and frontend interface, can be found at [/docs/setup.md](/docs/setup.md).\n\n### Deployment\n\nThe instructions to deploy the API server and frontend on the cloud, can be found at [/docs/deployment.md](/docs/deployment.md).\n\n### Slides\n\nCRIA v1.3 was first presented in a private session on 18 Aug 2023. The slides is publicly available [here](https://docs.google.com/presentation/d/1HdHfl0XiGIvRd-R3AHTEZn8Ee9ibFTp_Dv-q1S5SgrQ/edit?usp=sharing).\n\n### Architectural Overview\n\nThe overview of the project can be found at [/docs/architecture.md](/docs/architecture.md).\n\n### Architectural Decision Records (ADR)\n\nPlease refer to the [/docs/adr/](/docs/adr/) folder for the detailed information on the list of design decisions made so far.\n\n### Model Evaluation\n\nThe preliminary model evaluation can be be found at [/docs/model-eval/](/docs/model-eval/) folder.\n\n## References\n\n### Guides / Tutorials / Discussions\n\n- [ML Blog - Fine-Tune Your Own Llama 2 Model in a Colab Notebook](https://mlabonne.github.io/blog/posts/Fine_Tune_Your_Own_Llama_2_Model_in_a_Colab_Notebook.html)\n- [Fine-tune Llama 2 in Google Colab.ipynb - Colaboratory](https://colab.research.google.com/drive/1PEQyJO1-f6j0S_XJ8DV50NkpzasXkrzd?usp=sharing)\n- [Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA](https://huggingface.co/blog/4bit-transformers-bitsandbytes)\n- [bnb-4bit-training.ipynb - Colaboratory](https://colab.research.google.com/drive/1VoYNfYDKcKRQRor98Zbf2-9VQTtGJ24k?usp=sharing)\n- [🐐Llama 2 Fine-Tune with QLoRA [Free Colab 👇🏽] - YouTube](https://www.youtube.com/watch?v=eeM6V5aPjhk)\n- [Fine-Tune Large LLMs with QLoRA (Free Colab Tutorial) - YouTube](https://www.youtube.com/watch?v=NRVaRXDoI3g)\n- [LLaMA2 for Multilingual Fine Tuning? - YouTube](https://www.youtube.com/watch?v=ThKWQcyQXF8)\n- [How to Tune Falcon-7B With QLoRA on a Single GPU - YouTube](https://www.youtube.com/watch?v=AXG7TA7vIQ8)\n- [🦙Llama 2 Fine-Tuning with 4-Bit QLoRA on Dolly-15k [Free Colab 🙌] - YouTube](https://www.youtube.com/watch?v=o5bU1H-6TqM)\n- [Fine-Tune Your Own Llama 2 Model in a Colab Notebook | Towards Data Science](https://towardsdatascience.com/fine-tune-your-own-llama-2-model-in-a-colab-notebook-df9823a04a32)\n\n### Datasets\n\n- [mlabonne/CodeLlama-2-20k](https://huggingface.co/datasets/mlabonne/CodeLlama-2-20k)\n- [n3rd0/DreamBook_Guanaco_Format](https://huggingface.co/datasets/n3rd0/DreamBook_Guanaco_Format)\n- [Elliot4AI/dolly-15k-chinese-guanacoformat](https://huggingface.co/datasets/Elliot4AI/dolly-15k-chinese-guanacoformat)\n\n### Models\n\n- [NousResearch/Llama-2-7b-chat-hf](https://huggingface.co/NousResearch/Llama-2-7b-chat-hf)\n- [TinyPixel/Llama-2-7B-bf16-sharded](https://huggingface.co/TinyPixel/Llama-2-7B-bf16-sharded)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavzoku%2Fcria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavzoku%2Fcria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavzoku%2Fcria/lists"}