Skip to content

Commit c7a5ddc

Browse files
authored
Add introduction blogpost
1 parent 48b60fb commit c7a5ddc

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: "Integrate a Large Language Model with the xeus-cpp Jupyter kernel"
3+
layout: post
4+
excerpt: "Integrate a Large Language Model with the xeus-cpp Jupyter kernel, part of Google Summer of Code 2024, aims to integrate a large langauge model into the xeus kernel for users to interactively generate and execute code."
5+
sitemap: false
6+
author: Tharun Anandh
7+
permalink: blogs/gsoc24_tharun_anandh_introduction_blog/
8+
date: 2024-05-30
9+
tags: gsoc xeus xeus-cpp cpp llm
10+
---
11+
12+
### Introduction
13+
14+
I am Tharun A, currently working as an application developer at a global MNC. I graduated from the National Institute of Technology, Tiruchirapalli, India, in 2023, majoring in Computer Science and Engineering. I will be contributing to Xeus-cpp, developed by the wonderful developers at the Compiler Research Group from Princeton University and CERN.
15+
16+
**Mentors**: Anutosh Bhat, Johan Mabille, Aaron Jomy, David Lange, Vassil Vassilev
17+
18+
### What is Xeus-cpp?
19+
20+
Xeus-cpp, a Jupyter kernel for C++, is built upon the native implementation of the
21+
Jupyter protocol, xeus. This setup empowers users to interactively write and
22+
execute C++ code, providing immediate visibility into the results.With its REPL
23+
(read-eval-print-loop) functionality, users can rapidly prototype and iterate
24+
without the need to compile and run separate C++ programs.
25+
26+
### How will this project help?
27+
28+
With the ever growing popularity of large language models, this project aims to
29+
integrate a large language model with the xeus-cpp Jupyter kernel. This
30+
integration will enable users to interactively generate and execute code in C++
31+
leveraging the assistance of the language model.
32+
33+
### Why GSoC?
34+
35+
I aspire to participate in GSoC because it offers an excellent opportunity to immerse myself in open source. Since college, I have consistently engaged in various activities, and this program seems like a fantastic chance to further expand my knowledge and enhance my software skills. I find compiler design intriguing, an area I didn't explore deeply during college. With the continual advancement of language models, this endeavor promises to enhance my understanding of compiler design and broaden my expertise in LLMs.
36+
37+
### Implementation
38+
39+
1. **Communication with Xeus-cpp**: Using Xplugin, an open-source plugin system developed by some of the Jupyter core team, allows for the creation of a loosely coupled and interchangeable project. This makes it easier to implement other LLMs or add various functionalities to Xeus-cpp in the future.
40+
41+
2. **Autocompletion**: Code completion is an essential feature in AI-assisted coding editors. The complete_request_impl function defined in Xeus will be helpful for this purpose. This function is called whenever any Jupyter frontend requests code completion following user action, such as pressing 'tab' on the keyboard. This triggers the Jupyter kernel to provide several completion options based on the context.
42+
43+
3. **Code Generation**:One way to implement code generation is by using magic commands. These are activated whenever the execute_request_impl method is called. When the Jupyter frontend requests the kernel to run code from a cell, the kernel first checks for valid code to execute, including any magic commands. Magic commands are recognized by their specific format, written as %%<magic_command.
44+
45+
4. **Communication with LLM**: This largely depends on choosing between open-source LLMs and closed-source LLMs. Closed-source LLMs, like OpenAI and Gemini, provide users with an API key for use with Xeus-cpp and may offer slightly better performance. In contrast, open-source LLMs offer greater privacy but come with their own backend development challenges.
46+
47+
4. **Testing**: Xeus-cpp includes comprehensive testing support for both the code and the kernel. This ensures that all possible scenarios are covered and helps verify that both the project and Xeus are functioning perfectly.
48+
49+
With this implementation, I aim to achieve the deliverables and address any new challenges that may arise.
50+
51+
### Conclusion
52+
53+
Completing this project, I aim to boost developers' productivity and satisfy my thirst for learning, particularly in these areas where I have less expertise. Additionally, I intend to continue contributing to this organization beyond this project and explore the vast world of open source.
54+
55+
### Related Links
56+
57+
- [Xeus-cpp Repository](https://github.com/compiler-research/xeus-cpp)
58+
- [Project Description](https://hepsoftwarefoundation.org/gsoc/2024/proposal_XeusCpp-LLM.html)
59+
- [GSoC Project Proposal](/assets/docs/TharunA_GSoC_Proposal_2024-Xeus-Cpp.pdf)
60+
- [My GitHub Profile](https://github.com/tharun571)

0 commit comments

Comments
 (0)