You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CodeGen/README.md
+73-20Lines changed: 73 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Code Generation Application
2
2
3
-
Code Generation (CodeGen) Large Language Models (LLMs) are specialized AI models designed for the task of generating computer code. Such models undergo training with datasets that encompass repositories, specialized documentation, programming code, relevant web content, and other related data. They possess a deep understanding of various programming languages, coding patterns, and software development concepts. CodeGen LLMs are engineered to assist developers and programmers. When these LLMs are seamlessly integrated into the developer's Integrated Development Environment (IDE), they possess a comprehensive understanding of the coding context, which includes elements such as comments, function names, and variable names. This contextual awareness empowers them to provide more refined and contextually relevant coding suggestions.
3
+
Code Generation (CodeGen) Large Language Models (LLMs) are specialized AI models designed for the task of generating computer code. Such models undergo training with datasets that encompass repositories, specialized documentation, programming code, relevant web content, and other related data. They possess a deep understanding of various programming languages, coding patterns, and software development concepts. CodeGen LLMs are engineered to assist developers and programmers. When these LLMs are seamlessly integrated into the developer's Integrated Development Environment (IDE), they possess a comprehensive understanding of the coding context, which includes elements such as comments, function names, and variable names. This contextual awareness empowers them to provide more refined and contextually relevant coding suggestions. Additionally Retrieval-Augmented Generation (RAG) and Agents are parts of the CodeGen example which provide an additional layer of intelligence and adaptability, ensuring that the generated code is not only relevant but also accurate, efficient, and tailored to the specific needs of the developers and programmers.
[Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) may be a gated model that requires submitting an access request through Hugging Face. You can replace it with another model.
102
-
Change the `LLM_MODEL_ID` below for your needs, such as: [deepseek-ai/deepseek-coder-6.7b-instruct](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct)
123
+
[Qwen/Qwen2.5-Coder-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) may be a gated model that requires submitting an access request through Hugging Face. You can replace it with another model for m.
124
+
Change the `LLM_MODEL_ID` below for your needs, such as: [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct), [deepseek-ai/deepseek-coder-6.7b-instruct](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct)
103
125
104
126
If you choose to use `meta-llama/CodeLlama-7b-hf` as LLM model, you will need to visit [here](https://huggingface.co/meta-llama/CodeLlama-7b-hf), click the `Expand to review and access` button to ask for model access.
105
127
@@ -134,22 +156,44 @@ To set up environment variables for deploying ChatQnA services, follow these ste
134
156
135
157
#### Deploy CodeGen on Gaudi
136
158
137
-
Find the corresponding [compose.yaml](./docker_compose/intel/hpu/gaudi/compose.yaml).
159
+
Find the corresponding [compose.yaml](./docker_compose/intel/hpu/gaudi/compose.yaml). User could start CodeGen based on TGI or vLLM service:
138
160
139
161
```bash
140
162
cd GenAIExamples/CodeGen/docker_compose/intel/hpu/gaudi
141
-
docker compose up -d
163
+
```
164
+
165
+
TGI service:
166
+
167
+
```bash
168
+
docker compose --profile codegen-gaudi-tgi up -d
169
+
```
170
+
171
+
vLLM service:
172
+
173
+
```bash
174
+
docker compose --profile codegen-gaudi-vllm up -d
142
175
```
143
176
144
177
Refer to the [Gaudi Guide](./docker_compose/intel/hpu/gaudi/README.md) to build docker images from source.
145
178
146
179
#### Deploy CodeGen on Xeon
147
180
148
-
Find the corresponding [compose.yaml](./docker_compose/intel/cpu/xeon/compose.yaml).
181
+
Find the corresponding [compose.yaml](./docker_compose/intel/cpu/xeon/compose.yaml). User could start CodeGen based on TGI or vLLM service:
149
182
150
183
```bash
151
184
cd GenAIExamples/CodeGen/docker_compose/intel/cpu/xeon
152
-
docker compose up -d
185
+
```
186
+
187
+
TGI service:
188
+
189
+
```bash
190
+
docker compose --profile codegen-xeon-tgi up -d
191
+
```
192
+
193
+
vLLM service:
194
+
195
+
```bash
196
+
docker compose --profile codegen-xeon-vllm up -d
153
197
```
154
198
155
199
Refer to the [Xeon Guide](./docker_compose/intel/cpu/xeon/README.md) for more instructions on building docker images from source.
@@ -170,6 +214,15 @@ Two ways of consuming CodeGen Service:
170
214
-d '{"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."}'
171
215
```
172
216
217
+
If the user wants a CodeGen service with RAG and Agents based on dedicated documentation.
218
+
219
+
```bash
220
+
curl http://localhost:7778/v1/codegen \
221
+
-H "Content-Type: application/json" \
222
+
-d '{"agents_flag": "True", "index_name": "my_API_document", "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."}'
223
+
224
+
```
225
+
173
226
2. Access via frontend
174
227
175
228
To access the frontend, open the following URL in your browser: http://{host_ip}:5173.
0 commit comments