A blueprint for designing production LLM systems: From Notebooks to production
How to get a GitHub Copilot subscription for FREE (to 5x writing code). Learn to build production ML systems by building an LLM application.
Decoding ML Notes
This weekโs topics:
How to get a GitHub Copilot subscription for FREE (to 5x writing code)
A blueprint for designing production LLM systems: From Notebooks to production
Learn to build production ML systems by building an LLM application
How to get a GitHub Copilot subscription for FREE (to 5x writing code)
๐๐ผ๐ to get a ๐๐ถ๐๐๐๐ฏ ๐๐ผ๐ฝ๐ถ๐น๐ผ๐ ๐๐๐ฏ๐๐ฐ๐ฟ๐ถ๐ฝ๐๐ถ๐ผ๐ป for ๐๐ฅ๐๐ (to 5x writing code) โ
There are other alternatives, but GitHub Copilot is still the leading solution due to 2 factors: performance & convenience.
If you can get it for free, there are 0 reasons not to use it (sneaky move Microsoft) โ
๐ฆ๐ผ ๐๐ต๐ฎ๐ ๐ถ๐ ๐๐ต๐ฒ ๐๐ผ๐น๐๐๐ถ๐ผ๐ป?
There is no secret.
As stated in their docs: "Verified students, teachers, and maintainers of popular open source projects on GitHub are eligible to use Copilot Individual for free. "
๐ Docs
To become a student or teacher when you are not is not a solution.
But...
To become a maintainer of a popular open-source project is!
๐ฆ๐ผ ๐๐ต๐ฎ๐ ๐ฎ๐ฟ๐ฒ ๐๐ต๐ฒ ๐ฐ๐ฟ๐ถ๐๐ฒ๐ฟ๐ถ๐ฎ ๐ณ๐ผ๐ฟ ๐ฏ๐ฒ๐ฐ๐ผ๐บ๐ถ๐ป๐ด ๐ฎ "๐บ๐ฎ๐ถ๐ป๐๐ฎ๐ถ๐ป๐ฒ๐ฟ ๐ผ๐ณ ๐ฎ ๐ฝ๐ผ๐ฝ๐๐น๐ฎ๐ฟ ๐ผ๐ฝ๐ฒ๐ป-๐๐ผ๐๐ฟ๐ฐ๐ฒ ๐ฝ๐ฟ๐ผ๐ท๐ฒ๐ฐ๐"?
I don't know the exact formula, but here are some examples.
I am eligible for it because I am the owner of a GitHub repository with ~2.2k stars & 350 forks: ๐ Hands-on LLMs Course
After digging into some Reddit threads, a dude said that for a repo with ~520 stars & 299 forks, you got the free subscription.
The idea is that you don't have to be a maintainer of Pandas or PyTorch to become eligible.
.
๐ง๐ต๐ฒ ๐ฐ๐ผ๐ป๐ฐ๐น๐๐๐ถ๐ผ๐ป ๐ถ๐ ๐๐ผ...
โ start contributing to open-source or creating your cool project, which will complete the job!
.
๐๐ง ๐บ๐ฐ๐ถ ๐ฃ๐ฆ๐ต๐ต๐ฆ๐ณ ๐ฌ๐ฏ๐ฐ๐ธ ๐ต๐ฉ๐ฆ "๐ด๐ฆ๐ค๐ณ๐ฆ๐ต ๐ง๐ฐ๐ณ๐ฎ๐ถ๐ญ๐ข/๐ค๐ณ๐ช๐ต๐ฆ๐ณ๐ช๐ข," ๐ฑ๐ญ๐ฆ๐ข๐ด๐ฆ ๐ญ๐ฆ๐ข๐ท๐ฆ ๐ช๐ต ๐ช๐ฏ ๐ต๐ฉ๐ฆ ๐ค๐ฐ๐ฎ๐ฎ๐ฆ๐ฏ๐ต๐ด ๐ง๐ฐ๐ณ ๐ฐ๐ต๐ฉ๐ฆ๐ณ๐ด ๐ต๐ฐ ๐ฌ๐ฏ๐ฐ๐ธ.
Also, let me know if you know that when contributing to open-source, you must contribute by "how much" until you become eligible.
A blueprint for designing production LLM systems: From Notebooks to production
I am ๐พ๐๐ถ๐๐๐ถ๐ป๐ด ๐ฐ๐ฟ๐ฒ๐ฎ๐๐ถ๐ป๐ด ๐ฐ๐ผ๐ป๐๐ฒ๐ป๐... ๐๐ผ๐ธ๐ถ๐ป๐ด, but here is ๐ต๐ผ๐ to ๐ฏ๐๐ถ๐น๐ฑ your ๐๐๐ ๐๐๐ถ๐ป for ๐ด๐ฒ๐ป๐ฒ๐ฟ๐ฎ๐๐ถ๐ป๐ด posts or articles ๐๐๐ถ๐ป๐ด ๐๐ผ๐๐ฟ ๐๐ผ๐ถ๐ฐ๐ฒ โ
๐ช๐ต๐ฎ๐ ๐ถ๐ ๐ฎ๐ป ๐๐๐ ๐๐๐ถ๐ป?
It's an AI character who writes like you, using your writing style and personality.
๐ช๐ต๐ ๐ป๐ผ๐ ๐ฑ๐ถ๐ฟ๐ฒ๐ฐ๐๐น๐ ๐๐๐ฒ ๐๐ต๐ฎ๐๐๐ฃ๐ง? ๐ฌ๐ผ๐ ๐บ๐ฎ๐ ๐ฎ๐๐ธ...
When generating content using an LLM, the results tend to:
- be very generic and unarticulated,
- contain misinformation (due to hallucination),
- require tedious prompting to achieve the desired result.
๐ง๐ต๐ฎ๐ ๐ถ๐ ๐๐ต๐, ๐ณ๐ผ๐ฟ ๐ด๐ฒ๐ป๐ฒ๐ฟ๐ฎ๐๐ถ๐ป๐ด ๐ฐ๐ผ๐ป๐๐ฒ๐ป๐, ๐๐ผ๐ ๐ป๐ฒ๐ฒ๐ฑ ๐ฎ ๐๐ฝ๐ฒ๐ฐ๐ถ๐ฎ๐น๐ถ๐๐ฒ๐ฑ ๐๐ผ๐ผ๐น ๐๐ต๐ฎ๐:
โ is fine-tuned on your digital content to replicate your persona
โ has access to a vector DB (with relevant data) to avoid hallucinating and write only about concrete facts
๐๐ฒ๐ฟ๐ฒ ๐ฎ๐ฟ๐ฒ ๐๐ต๐ฒ ๐บ๐ฎ๐ถ๐ป ๐๐๐ฒ๐ฝ๐ ๐ฟ๐ฒ๐พ๐๐ถ๐ฟ๐ฒ๐ฑ ๐๐ผ ๐ฏ๐๐ถ๐น๐ฑ ๐๐ผ๐๐ฟ ๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐๐ถ๐ผ๐ป-๐ฟ๐ฒ๐ฎ๐ฑ๐ ๐๐๐ ๐๐๐ถ๐ป:
1. A data collection pipeline will gather your digital data from Medium, Substack, LinkedIn and GitHub. It will be normalized and saved to a Mongo DB.
2. Using CDC, you listen to any changes made to the Mongo DB and add them as events to a RabbitMQ queue.
3. A Bytewax streaming ingestion pipeline will listen to the queue to clean, chunk, and embed the data in real time.
4. The cleaned and embedded data is loaded to a Qdrant vector DB.
5. On the training pipeline side, you use a vector DB retrieval client to build your training dataset, which consists of the cleaned data (augmented using RAG).
6. You fine-tune an open-source Mistral LLM using QLoRA and push all the experiment artifacts to a Comet experiment tracker.
7. Based on the best experiment, you push the LLM candidate to Comet's model registry. You carefully evaluate the LLM candidate using Comet's prompt monitoring dashboard. If the evaluation passes, you tag it as accepted.
8. On the inference pipeline side, you deploy the new LLM model by pulling it from the model registry, loading it, and quantizing it.
9. The inference pipeline is wrapped by a REST API, which allows users to make ChatGPT-like requests.
Learn to build production ML systems by building an LLM application
Taking in mind the blueprint for designing production LLM systems presented above, we want to let you know that:
โ We are close to wrapping our LLM twin course lessons and code.
To give more context for newcomers, in the past weeks we started ๐ฟ๐ฒ๐น๐ฒ๐ฎ๐๐ถ๐ป๐ด an ๐ฒ๐ป๐ฑ-๐๐ผ-๐ฒ๐ป๐ฑ ๐ฐ๐ผ๐๐ฟ๐๐ฒ on ๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐๐ถ๐ผ๐ป ๐๐๐ ๐ by teaching you how to ๐ฏ๐๐ถ๐น๐ฑ an ๐๐๐ ๐๐๐ถ๐ป: ๐ ๐ฐ๐ถ๐ณ ๐๐ณ๐ฐ๐ฅ๐ถ๐ค๐ต๐ช๐ฐ๐ฏ-๐๐ฆ๐ข๐ฅ๐บ ๐๐ ๐๐ฆ๐ฑ๐ญ๐ช๐ค๐ข
Soโฆ
If you are looking for an ๐ฒ๐ป๐ฑ-๐๐ผ-๐ฒ๐ป๐ฑ ๐๐ฅ๐๐ ๐ฐ๐ผ๐๐ฟ๐๐ฒ on ๐ต๐ผ๐ to ๐ฏ๐๐ถ๐น๐ฑ ๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐๐ถ๐ผ๐ป-๐ฟ๐ฒ๐ฎ๐ฑ๐ ๐๐๐ ๐๐๐๐๐ฒ๐บ๐, consider checking the course's first FREE lesson.
๐๐ฉ๐ฆ ๐ค๐ฐ๐ถ๐ณ๐ด๐ฆ ๐ธ๐ช๐ญ๐ญ ๐ธ๐ข๐ญ๐ฌ ๐บ๐ฐ๐ถ ๐ต๐ฉ๐ณ๐ฐ๐ถ๐จ๐ฉ ๐ข ๐ง๐ถ๐ญ๐ญ-๐ด๐ต๐ข๐ค๐ฌ ๐ฑ๐ณ๐ฐ๐ค๐ฆ๐ด๐ด:
โ from data gathering...
...until deploying and monitoring your LLM twin using LLMOps โ
.
With that in mind...
The ๐ญ๐๐ ๐น๐ฒ๐๐๐ผ๐ป will walk you through:
- the issues of generating content using ChatGPT (or other similar solutions)
- the 3-pipeline design
- the system design and architecture of the LLM twin
.
Within the ๐๐๐๐๐ฒ๐บ ๐ฑ๐ฒ๐๐ถ๐ด๐ป ๐๐ฒ๐ฐ๐๐ถ๐ผ๐ป, we will present all the ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฎ๐น ๐ฑ๐ฒ๐ฐ๐ถ๐๐ถ๐ผ๐ป๐ on ๐ต๐ผ๐ to ๐ฏ๐๐ถ๐น๐ฑ:
- a data collection pipeline
- a real-time feature pipeline using a streaming engine
- hook the data and feature pipelines using the CDC pattern
- a continuous fine-tuning pipeline
- an inference pipeline deployed as a REST API
A ๐ฝ๐ฎ๐ฟ๐๐ถ๐ฐ๐๐น๐ฎ๐ฟ ๐ณ๐ผ๐ฐ๐๐ will be on ๐ถ๐ป๐๐ฒ๐ด๐ฟ๐ฎ๐๐ถ๐ป๐ด ๐ ๐๐ข๐ฝ๐ & ๐๐๐ ๐ข๐ฝ๐ ๐ด๐ผ๐ผ๐ฑ ๐ฝ๐ฟ๐ฎ๐ฐ๐๐ถ๐ฐ๐ฒ๐:
- prompt versioning
- model registries
- experiment tracker
- prompt monitoring
- CI/CD
- IaC
- Docker
.
๐๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐๐ ๐๐ฃ๐ฉ๐ค ๐ฉ๐๐ 1๐จ๐ฉ ๐ก๐๐จ๐จ๐ค๐ฃ?
๐๐ต๐ฒ๐ฐ๐ธ ๐ถ๐ ๐ผ๐๐. It's FREE, and no registration is required
โโโ
๐ ๐๐ฆ๐ด๐ด๐ฐ๐ฏ 1 - ๐๐ฏ ๐๐ฏ๐ฅ-๐ต๐ฐ-๐๐ฏ๐ฅ ๐๐ณ๐ข๐ฎ๐ฆ๐ธ๐ฐ๐ณ๐ฌ ๐ง๐ฐ๐ณ ๐๐ณ๐ฐ๐ฅ๐ถ๐ค๐ต๐ช๐ฐ๐ฏ-๐๐ฆ๐ข๐ฅ๐บ ๐๐๐ ๐๐บ๐ด๐ต๐ฆ๐ฎ๐ด ๐ฃ๐บ ๐๐ถ๐ช๐ญ๐ฅ๐ช๐ฏ๐จ ๐ ๐ฐ๐ถ๐ณ ๐๐๐ ๐๐ธ๐ช๐ฏ
Images
If not otherwise stated, all images are created by the author.