How do LLMs handle out-of-vocabulary (OOV) words?
TechnicalMachine Learning EngineerAI EngineerGenAI DeveloperML ENGINEER LLMML EngineerData ScientistAI ResearcherLLMs handle out-of-vocabulary (OOV) words primarily through subword tokenization. This technique breaks down words into smaller units, allowing the model to represent OOV words as combinations of known subwords. For example, the word "unhappiness" might be split into "un", "happi", and "ness", enabling the model to understand the meaning despite not having seen the full word before.
Additionally, using contextual embeddings allows the model to infer meanings based on surrounding words, improving its ability to generate relevant responses even with OOV terms.