Skip to content

Commit 69e3cb8

Browse files
committed
add 2 more QAs
1 parent 10968ac commit 69e3cb8

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

docs/machine_learning/interview_questions.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,4 +474,37 @@
474474

475475
=== "Answer"
476476
477-
Group size is a parameter used in the quantization process that determines the number of weights or activations *(imagine weights in a row of matrix)* that are quantized together. A smaller group size can lead to better quantization accuracy, but it can also increase the memory and computational requirements of the model. Group size is an important hyperparameter that needs to be tuned to achieve the best trade-off between accuracy and efficiency. Note, the default groupsize for a GPTQ is 1024. [Refer this interesting Reddit discussion](https://www.reddit.com/r/LocalLLaMA/comments/12rtg82/what_is_group_size_128_and_why_do_30b_models_give/?rdt=46348)
477+
Group size is a parameter used in the quantization process that determines the number of weights or activations *(imagine weights in a row of matrix)* that are quantized together. A smaller group size can lead to better quantization accuracy, but it can also increase the memory and computational requirements of the model. Group size is an important hyperparameter that needs to be tuned to achieve the best trade-off between accuracy and efficiency. Note, the default groupsize for a GPTQ is 1024. [Refer this interesting Reddit discussion](https://www.reddit.com/r/LocalLLaMA/comments/12rtg82/what_is_group_size_128_and_why_do_30b_models_give/?rdt=46348)
478+
479+
!!! Question ""
480+
=== "Question"
481+
#### What is EMA (Exponential Moving Average) in context of deep learning?
482+
483+
=== "Answer"
484+
485+
EMA is a technique used in deep learning to stabilize the training process and improve the generalization performance of the model. It works by maintaining a moving average of the model's parameters during training, which helps to smooth out the noise in the gradients and prevent the model from overfitting to the training data. Usually during training, the model's parameters are updated using the gradients of the loss function, but the EMA parameters are updated using a weighted average of the current parameters and the previous EMA parameters, as shown below:
486+
487+
$$
488+
\text{ema_param} = \text{ema_param} * \text{decay} + \text{param} * (1 - \text{decay})
489+
$$
490+
491+
One more advantage of EMA model is that it can be used to resume the training. Some models provide both the model parameters and EMA parameters.
492+
493+
!!! Question ""
494+
=== "Question"
495+
#### What is Bradley-Terry model? And how is it used in machine learning?
496+
497+
=== "Answer"
498+
499+
Bradley-Terry model is a probability model that can be used to model the outcome of a pairwise comparison between two items. It is commonly used in sports analytics to rank teams or players based on their performance in head-to-head matches. Refer: [Wikipedia](https://en.wikipedia.org/wiki/Bradley%E2%80%93Terry_model)
500+
501+
In case of ML, the model is a popular choice for modeling human preferences in the context of training language models. It stipulates that the probability of a human preferring one completion over another can be expressed as a ratio of exponentials of the latent reward associated with each completion. Specifically, the human preference distribution
502+
503+
$$
504+
p^*(y_1 \succ y_2 | x) = \frac{exp(r^*(x, y_1))}{exp(r^*(x, y_1)) + exp(r^*(x, y_2))}
505+
$$
506+
507+
This model is commonly used to capture human preferences to provide a framework for understanding and incorporating human feedback into the training of language models.
508+
509+
510+

0 commit comments

Comments
 (0)