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: ai-quick-actions/fine-tuning-tips.md
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,6 +139,81 @@ The accuracy metric reflects the proportion of correct completions made by the m
139
139
140
140
As the training progresses, monitoring both accuracy and loss provides insights into the model's learning dynamics. A decreasing loss alongside increasing accuracy suggests that the model is learning effectively. However, it's important to watch for signs of over-fitting, where the model performs exceptionally well on the training data but fails to generalize to new, unseen data. This can be detected if the validation loss stops decreasing or starts increasing, even as training loss continues to decline.
141
141
142
+
### Advanced Configuration Update Options
143
+
144
+
The available shapes for models in AI Quick Actions are pre-configured for fine-tuning for the models available in the Fine-Tuned model tab.
145
+
However, if you need to add more shapes to the list of
146
+
available options, you can do so by updating the relevant configuration file. Currently, this
147
+
update option is only available for models that users can register.
148
+
149
+
#### For Custom Models:
150
+
To add shapes for custom models, follow these steps:
151
+
152
+
1.**Register the model**: Ensure the model is registered via AI Quick Actions UI or CLI.
153
+
154
+
2.**Navigate to the model's artifact directory**: After registration, locate the directory where the model's artifacts are stored in the object storage.
155
+
156
+
3.**Create a configuration folder**: Inside the artifact directory, create a new folder named config. For example, if the model path is `oci://<bucket>@namespace/path/to/model/`
157
+
then create a folder `oci://<bucket>@namespace/path/to/model/config`.
158
+
159
+
4.**Add a fine-tuning configuration file**: Within the config folder, create a file named `ft_config.json` with the following content:
160
+
161
+
162
+
```
163
+
{
164
+
"shape":
165
+
{
166
+
"VM.GPU.A10.1":
167
+
{
168
+
"batch_size": 1,
169
+
"replica": "1-10"
170
+
},
171
+
"VM.GPU.A10.2":
172
+
{
173
+
"batch_size": 1,
174
+
"replica": "1-10"
175
+
},
176
+
"BM.GPU.A10.4":
177
+
{
178
+
"batch_size": 1,
179
+
"replica": 1
180
+
},
181
+
"BM.GPU4.8":
182
+
{
183
+
"batch_size": 4,
184
+
"replica": 1
185
+
},
186
+
"BM.GPU.L40S-NC.4":
187
+
{
188
+
"batch_size": 4,
189
+
"replica": 1
190
+
},
191
+
"BM.GPU.A100-v2.8":
192
+
{
193
+
"batch_size": 6,
194
+
"replica": 1
195
+
},
196
+
"BM.GPU.H100.8":
197
+
{
198
+
"batch_size": 6,
199
+
"replica": 1
200
+
}
201
+
},
202
+
"finetuning_params": "--trust_remote_code True"
203
+
}
204
+
```
205
+
This JSON file lists all available shapes that can be used to fine-tune a model via AI Quick Actions. It also has additional
206
+
configuration that can be set via the configuration field.
207
+
208
+
5. Modify shapes or configuration as needed: If you want to add or remove any
209
+
[shapes supported](https://docs.oracle.com/en-us/iaas/data-science/using/supported-shapes.htm) by
210
+
the OCI Data Science platform, you can directly edit this `ft_config.json` file.
211
+
6. In addition to the shapes list, you can also use other configuration listed in the above json. Another field called
212
+
`finetuning_params` is available if you want to explicitly pass additional parameters to the launch of the fine-tuning container.
213
+
For example, the field `"finetuning_params": "--trust_remote_code True"` might be required if the model
214
+
needs to execute the code that resides on the Hugging Face Hub rather than natively in the Transformers library.
Copy file name to clipboardExpand all lines: ai-quick-actions/model-deployment-tips.md
+88Lines changed: 88 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -304,6 +304,94 @@ public class RestExample {
304
304
305
305
```
306
306
307
+
### Advanced Configuration Update Options
308
+
309
+
The available shapes for models in AI Quick Actions are pre-configured for both registration and
310
+
deployment for models available in the Model Explorer. However, if you need to add more shapes to the list of
311
+
available options, you can do so by updating the relevant configuration file. Currently, this
312
+
update option is only available for models that users can register.
313
+
314
+
#### For Custom Models:
315
+
To add shapes for custom models, follow these steps:
316
+
317
+
1.**Register the model**: Ensure the model is registered via AI Quick Actions UI or CLI.
318
+
319
+
2.**Navigate to the model's artifact directory**: After registration, locate the directory where the model's artifacts are stored in the object storage.
320
+
321
+
3.**Create a configuration folder**: Inside the artifact directory, create a new folder named config. For example, if the model path is `oci://<bucket>@namespace/path/to/model/`
322
+
then create a folder `oci://<bucket>@namespace/path/to/model/config`.
323
+
324
+
4.**Add a deployment configuration file**: Within the config folder, create a file named `deployment_config.json` with the following content:
325
+
326
+
327
+
```
328
+
{
329
+
"configuration": {
330
+
"VM.Standard.A1.Flex": {
331
+
"parameters": {},
332
+
"shape_info": {
333
+
"configs": [
334
+
{
335
+
"memory_in_gbs": 128,
336
+
"ocpu": 20
337
+
},
338
+
{
339
+
"memory_in_gbs": 256,
340
+
"ocpu": 40
341
+
},
342
+
{
343
+
"memory_in_gbs": 384,
344
+
"ocpu": 60
345
+
},
346
+
{
347
+
"memory_in_gbs": 512,
348
+
"ocpu": 80
349
+
}
350
+
],
351
+
"type": "CPU"
352
+
}
353
+
}
354
+
},
355
+
"shape": [
356
+
"VM.GPU.A10.1",
357
+
"VM.GPU.A10.2",
358
+
"BM.GPU.A10.4",
359
+
"BM.GPU4.8",
360
+
"BM.GPU.L40S-NC.4",
361
+
"BM.GPU.A100-v2.8",
362
+
"BM.GPU.H100.8",
363
+
"VM.Standard.A1.Flex"
364
+
]
365
+
}
366
+
```
367
+
368
+
This JSON file lists all available GPU and CPU shapes for AI Quick Actions.
369
+
The CPU shapes include additional configuration details required for model deployment,
370
+
such as memory and OCPU settings.
371
+
372
+
5. Modify shapes as needed: If you want to add or remove any
373
+
[shapes supported](https://docs.oracle.com/en-us/iaas/data-science/using/supported-shapes.htm) by
374
+
the OCI Data Science platform, you can directly edit this `deployment_config.json` file.
375
+
376
+
6. The `configuration` field in this json file can also support parameters for vLLM and TGI inference containers. For example,
377
+
if a model can be deployed by either one of these containers, and you want to set the server parameters through configuration file, then
378
+
you can add the corresponding shape along with the parameter value inside the `configuration` field. You can achieve the same
379
+
using [Advanced Deployment Options](#advanced-deployment-options) from AI Quick Actions UI as well.
0 commit comments