ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 70 - Professional Machine Learning Engineer discussion

Report
Export

You are developing an ML model intended to classify whether X-Ray images indicate bone fracture risk. You have trained on Api Resnet architecture on Vertex AI using a TPU as an accelerator, however you are unsatisfied with the trainning time and use memory usage. You want to quickly iterate your training code but make minimal changes to the code. You also want to minimize impact on the models accuracy. What should you do?

A.
Configure your model to use bfloat16 instead float32
Answers
A.
Configure your model to use bfloat16 instead float32
B.
Reduce the global batch size from 1024 to 256
Answers
B.
Reduce the global batch size from 1024 to 256
C.
Reduce the number of layers in the model architecture
Answers
C.
Reduce the number of layers in the model architecture
D.
Reduce the dimensions of the images used un the model
Answers
D.
Reduce the dimensions of the images used un the model
Suggested answer: A

Explanation:

Using bfloat16 instead of float32 can reduce the memory usage and training time of the model, while having minimal impact on the accuracy. Bfloat16 is a 16-bit floating-point format that preserves the range of 32-bit floating-point numbers, but reduces the precision from 24 bits to 8 bits. This means that bfloat16 can store the same magnitude of numbers as float32, but with less detail. Bfloat16 is supported by TPUs and some GPUs, and can be used as a drop-in replacement for float32 in most cases. Bfloat16 can also improve the numerical stability of the model, as it reduces the risk of overflow and underflow errors.

Reducing the global batch size, the number of layers, or the dimensions of the images can also reduce the memory usage and training time of the model, but they can also affect the model's accuracy and performance. Reducing the global batch size can make the model less stable and converge slower, as it reduces the amount of information available for each gradient update. Reducing the number of layers can make the model less expressive and powerful, as it reduces the depth and complexity of the network. Reducing the dimensions of the images can make the model less accurate and robust, as it reduces the resolution and quality of the input data.Reference:

Bfloat16: The secret to high performance on Cloud TPUs

Bfloat16 floating-point format

How does Batch Size impact your model learning

asked 18/09/2024
Winston Seedorf
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first