自学内容网 自学内容网

大厂100 NLP interview questions外企

CLASSIC NLP

TF-IDF & ML (8)
  1. Write TF-IDF from scratch.

  2. What is normalization in TF-IDF ?

  3. Why do you need to know about TF-IDF in our time, and how can you use it in complex models?

  4. Explain how Naive Bayes works. What can you use it for?

  5. How can SVM be prone to overfitting?

  6. Explain possible methods for text preprocessing ( lemmatization and stemming ). What algorithms do you know for this, and in what cases would you use them?

  7. What metrics for text similarity do you know?

  8. Explain the difference between cosine similarity and cosine distance. Which of these values can be negative? How would you use them?

METRICS (7)
  1. Explain precision and recall in simple words and what you would look at in the absence of F1 score?

  2. In what case would you observe changes in specificity ?

  3. When would you look at macro, and when at micro metrics? Why does the weighted metric exist?

  4. What is perplexity? What can we consider it with?

  5. What is the BLEU metric?

  6. Explain the difference between different types of ROUGE metrics?

  7. What is the difference between BLUE and ROUGE?

WORD2VEC(9)
  1. Explain how Word2Vec learns? What is the loss function? What is maximized?

  2. What methods of obtaining embeddings do you know? When will each be better?

  3. What is the difference between static and contextual embeddings?

  4. What are the two main architectures you know, and which one learns faster?

  5. What is the difference between Glove, ELMO, FastText, and Word2Vec ?

  6. What is negative sampling and why is it needed? What other tricks for Word2Vec do you know, and how can you apply them?

  7. What are dense and sparse embeddings? Provide examples.

  8. Why might the dimensionality of embeddings be important?

  9. What problems can arise when training Word2Vec on short textual data, and how can you deal with them?

RNN & CNN(7)
  1. How many training parameters are there in a simple 1-layer RNN ?

  2. How does RNN training occur?

  3. What problems exist in RNN?

  4. What types of RNN networks do you know? Explain the difference between GRU and LSTM?

  5. What parameters can we tune in such networks? (Stacking, number of layers)

  6. What are vanishing gradients for RNN? How do you solve this problem?

  7. Why use a Convolutional Neural Network in NLP, and how can you use it? How can you compare CNN within the attention paradigm?

NLP and TRANSFORMERS

ATTENTION AND TRANSFORMER ARCHITECTURE (15)
  1. How do you compute attention ? (additional: for what task was it proposed, and why?)

  2. Complexity of attention? Compare it with the complexity in RNN.

  3. Compare RNN and attention . In what cases would you use attention, and when RNN?

  4. Write attention from scratch.

  5. Explain masking in attention.

  6. What is the dimensionality of the self-attention matrix?

  7. What is the difference between BERT and GPT in terms of attention calculation ?

  8. What is the dimensionality of the embedding layer in the transformer?

  9. Why are embeddings called contextual? How does it work?

  10. What is used in transformers, layer norm or batch norm , and why?

  11. Why do transformers have PreNorm and PostNorm ?

  12. Explain the difference between soft and hard (local/global) attention?

  13. Explain multihead attention.

  14. What other types of attention mechanisms do you know? What are the purposes of these modifications?

  15. How does self-attention become more complex with an increase in the number of heads?

TRANSFORMER MODEL TYPES (7)

  1. Why does BERT largely lag behind RoBERTa , and what can you take from RoBERTa?

  2. What are T5 and BART models? How do they differ?

  3. What are task-agnostic models? Provide examples.

  4. Explain transformer models by comparing BERT, GPT, and T5.

  5. What major problem exists in BERT, GPT, etc., regarding model knowledge? How can this be addressed?

  6. How does a decoder-like GPT work during training and inference? What is the difference?

  7. Explain the difference between heads and layers in transformer models.

POSITIONAL ENCODING (6)

  1. Why is information about positions lost in embeddings of transformer models with attention?

  2. Explain approaches to positional embeddings and their pros and cons.

  3. Why can’t we simply add an embedding with the token index?

  4. Why don’t we train positional embeddings?

  5. What is relative and absolute positional encoding?

  6. Explain in detail the working principle of rotary positional embeddings.

PRETRAINING (4)
  1. How does causal language modeling work?

  2. When do we use a pretrained model?

  3. How to train a transformer from scratch? Explain your pipeline, and in what cases would you do this?

  4. What models, besides BERT and GPT, do you know for various pretraining tasks?

TOKENIZERS (9)
  1. What types of tokenizers do you know? Compare them.

  2. Can you extend a tokenizer? If yes, in what case would you do this? When would you retrain a tokenizer? What needs to be done when adding new tokens?

  3. How do regular tokens differ from special tokens?

  4. Why is lemmatization not used in transformers? And why do we need tokens?

  5. How is a tokenizer trained? Explain with examples of WordPiece and BPE .

  6. What position does the CLS vector occupy? Why?

  7. What tokenizer is used in BERT, and which one in GPT?

  8. Explain how modern tokenizers handle out-of-vocabulary words?

  9. What does the tokenizer vocab size affect? How will you choose it in the case of new training?

TRAINING (8)
  1. What is class imbalance? How can it be identified? Name all approaches to solving this problem.

  2. Can dropout be used during inference, and why?

  3. What is the difference between the Adam optimizer and AdamW?

  4. How do consumed resources change with gradient accumulation?

  5. How to optimize resource consumption during training?

  6. What ways of distributed training do you know?

  7. What is textual augmentation? Name all methods you know.

  8. Why is padding less frequently used? What is done instead?

  9. Explain how warm-up works.

  10. Explain the concept of gradient clipping?

  11. How does teacher forcing work, provide examples?

  12. Why and how should skip connections be used?

  13. What are adapters? Where and how can we use them?

  14. Explain the concepts of metric learning. What approaches do you know?

INFERENCE (4)
  1. What does the temperature in softmax control? What value would you set?

  2. Explain types of sampling in generation? top-k, top-p, nucleus sampling?

  3. What is the complexity of beam search, and how does it work?

  4. What is sentence embedding? What are the ways you can obtain it?

LLM (13)
  1. How does LoRA work? How would you choose parameters? Imagine that we want to fine-tune a large language model, apply LORA with a small R, but the model still doesn’t fit in memory. What else can be done?

  2. What is the difference between prefix tuning , p-tuning , and prompt tuning ?

  3. Explain the scaling law .

  4. Explain all stages of LLM training. From which stages can we abstain, and in what cases?

  5. How does RAG work? How does it differ from few-shot KNN?

  6. What quantization methods do you know? Can we fine-tune quantized models?

  7. How can you prevent catastrophic forgetting in LLM?

  8. Explain the working principle of KV cache , Grouped-Query Attention , and MultiQuery Attention .

  9. Explain the technology behind MixTral, what are its pros and cons?

  10. How are you? How are things going?


原文地址:https://blog.csdn.net/longwo888/article/details/137693278

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!