From 3d9f9c040e3242d90177589eb6b368309ab773eb Mon Sep 17 00:00:00 2001 From: alexsin368 Date: Tue, 19 Nov 2024 17:48:16 -0800 Subject: [PATCH 1/4] reorganize sample guides, add CodeGen top sample guide Signed-off-by: alexsin368 --- examples/CodeGen/CodeGen_Guide.rst | 48 ++++++++++++++++++++++++++++++ examples/index.rst | 4 +-- 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 examples/CodeGen/CodeGen_Guide.rst diff --git a/examples/CodeGen/CodeGen_Guide.rst b/examples/CodeGen/CodeGen_Guide.rst new file mode 100644 index 00000000..de915e7c --- /dev/null +++ b/examples/CodeGen/CodeGen_Guide.rst @@ -0,0 +1,48 @@ +.. _Codegen_Guide: + +Codegen Sample Guide +##################### + +.. note:: This guide is in its early development and is a work-in-progress with + placeholder content. + +Overview +******** + +The CodeGen example uses specialized AI models that went through training with datasets that +encompass repositories, documentation, programming code, and web data. With an understanding +of various programming languages, coding patterns, and software development concepts, the +CodeGen LLMs assist developers and programmers. The LLMs can be integrated into the developers' +Integrated Development Environments (IDEs) to have more contextual awareness to write more +refined and relevant code based on the suggestions. + +Purpose +******* +* Code Generation: Streamline coding through Code Generation, enabling non-programmers to describe tasks for code creation. +* Code Completion: Accelerate coding by suggesting contextually relevant snippets as developers type. +* Code Translation and Modernization: Translate and modernize code across multiple programming languages, aiding interoperability and updating legacy projects. +* Code Summarization: Extract key insights from codebases, improving readability and developer productivity. +* Code Refactoring: Offer suggestions for code refactoring, enhancing code performance and efficiency. +* AI-Assisted Testing: Assist in creating test cases, ensuring code robustness and accelerating development cycles. +* Error Detection and Debugging: Detect errors in code and provide detailed descriptions and potential fixes, expediting debugging processes. + +How It Works +************ + +The CodeGen example uses an open-source code generation model with Text Generation Inference (TGI) +for serving deployment. It is presented as a Code Copilot application as shown in the diagram below. + +.. figure:: /GenAIExamples/CodeGen/assets/img/codegen_architecture.png + :alt: CodeGen Architecture Diagram + +Deployment +********** +Here are some deployment options, depending on your hardware and environment: + +Single Node ++++++++++++++++ +.. toctree:: + :maxdepth: 1 + + Xeon Scalable Processor + Gaudi AI Accelerator diff --git a/examples/index.rst b/examples/index.rst index d9392887..9273bf8a 100644 --- a/examples/index.rst +++ b/examples/index.rst @@ -9,10 +9,8 @@ GenAIExamples are designed to give developers an easy entry into generative AI, :maxdepth: 1 ChatQnA/ChatQnA_Guide - ChatQnA/deploy/index AgentQnA/AgentQnA_Guide - CodeGen/deploy/gaudi.md - CodeGen/deploy/index + CodeGen/CodeGen_Guide ---- From 88b446e430841e36e04818e72bf1015654373bec Mon Sep 17 00:00:00 2001 From: alexsin368 Date: Tue, 19 Nov 2024 19:46:14 -0800 Subject: [PATCH 2/4] include index.rst files in toctrees Signed-off-by: alexsin368 --- examples/ChatQnA/ChatQnA_Guide.rst | 13 ++++++------- examples/CodeGen/CodeGen_Guide.rst | 5 +---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/ChatQnA/ChatQnA_Guide.rst b/examples/ChatQnA/ChatQnA_Guide.rst index d217f821..bcfba3e0 100644 --- a/examples/ChatQnA/ChatQnA_Guide.rst +++ b/examples/ChatQnA/ChatQnA_Guide.rst @@ -204,16 +204,15 @@ The gateway serves as the interface for users to access. The gateway routes inco Deployment ********** -See the :ref:`chatqna-example-deployment` that includes both single-node and +Here are some deployment options, including both single-node and orchestrated multi-node configurations, and choose the one that best fits your -requirements. Here are quick references to the single-node deployment options: - -* :doc:`Xeon Scalable Processor ` -* :doc:`Gaudi AI Accelerator ` -* :doc:`Nvidia GPU ` -* :doc:`AI PC ` +requirements. +.. toctree:: + :maxdepth: 1 + ChatQnA Deployment Options +---- Troubleshooting *************** diff --git a/examples/CodeGen/CodeGen_Guide.rst b/examples/CodeGen/CodeGen_Guide.rst index de915e7c..9fe6422b 100644 --- a/examples/CodeGen/CodeGen_Guide.rst +++ b/examples/CodeGen/CodeGen_Guide.rst @@ -39,10 +39,7 @@ Deployment ********** Here are some deployment options, depending on your hardware and environment: -Single Node -+++++++++++++++ .. toctree:: :maxdepth: 1 - Xeon Scalable Processor - Gaudi AI Accelerator + CodeGen Deployment Options From 8e8e9863ec226a40db8b806262d02dedd3052631 Mon Sep 17 00:00:00 2001 From: alexsin368 Date: Tue, 19 Nov 2024 19:51:56 -0800 Subject: [PATCH 3/4] correct toctree Signed-off-by: alexsin368 --- examples/ChatQnA/ChatQnA_Guide.rst | 2 +- examples/CodeGen/CodeGen_Guide.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ChatQnA/ChatQnA_Guide.rst b/examples/ChatQnA/ChatQnA_Guide.rst index bcfba3e0..0652c4c1 100644 --- a/examples/ChatQnA/ChatQnA_Guide.rst +++ b/examples/ChatQnA/ChatQnA_Guide.rst @@ -211,7 +211,7 @@ requirements. .. toctree:: :maxdepth: 1 - ChatQnA Deployment Options + ChatQnA Deployment Options ---- Troubleshooting diff --git a/examples/CodeGen/CodeGen_Guide.rst b/examples/CodeGen/CodeGen_Guide.rst index 9fe6422b..dd64bb49 100644 --- a/examples/CodeGen/CodeGen_Guide.rst +++ b/examples/CodeGen/CodeGen_Guide.rst @@ -42,4 +42,4 @@ Here are some deployment options, depending on your hardware and environment: .. toctree:: :maxdepth: 1 - CodeGen Deployment Options + CodeGen Deployment Options From d33bce2c5568732e5466a81ab5190d96c61e0e0f Mon Sep 17 00:00:00 2001 From: alexsin368 Date: Tue, 19 Nov 2024 19:55:43 -0800 Subject: [PATCH 4/4] fix indent Signed-off-by: alexsin368 --- examples/ChatQnA/ChatQnA_Guide.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ChatQnA/ChatQnA_Guide.rst b/examples/ChatQnA/ChatQnA_Guide.rst index 0652c4c1..7e9b4779 100644 --- a/examples/ChatQnA/ChatQnA_Guide.rst +++ b/examples/ChatQnA/ChatQnA_Guide.rst @@ -212,6 +212,7 @@ requirements. :maxdepth: 1 ChatQnA Deployment Options + ---- Troubleshooting