skip to content

Hugging Face

The Hub stores models and datasets as git repos; Transformers, Datasets, TRL and PEFT load and train them, and Inference Providers host them. Interviewers expect fluency from model id to output.

on this pageshow

questions

page 2 of 2

A script created a Hugging Face Inference Endpoint with huggingface_hub's create_inference_endpoint and no type argument — who can call it, and how do you restrict it?

level: seniorimportance: nice to knowfreq 4%

basics

~20 s

In huggingface_hub 2.1, type defaults to authenticated, so anyone with a Hugging Face account can call it with their own token. Recreate it with type private, the dashboard's default, adding AWS PrivateLink if traffic must stay off the internet.

open as a page

Upgrading to Transformers v5, a job calling pipeline('summarization') and pipeline('question-answering') fails; why, and what replaces those tasks?

level: seniorimportance: nice to knowfreq 7%

basics

~10 s

Transformers v5 removed the question-answering, summarization, translation and text2text-generation pipelines, plus image-to-text, visual-question-answering and image-to-image, so pipeline() raises an unknown-task KeyError. The replacement is text-generation with a chat model, or image-text-to-text for images.

open as a page

In Hugging Face Transformers, user text containing a literal special-token string such as '<|im_end|>' reaches a chat model — how is it tokenized, and what does split_special_tokens change?

level: seniorimportance: nice to knowfreq 5%

basics

~20 s

By default the tokenizer matches the string as the real special token, so user text can end a turn or forge a role marker. split_special_tokens=True encodes it as plain text, but set globally it also splits the template's markers.

open as a page

showing 31–33 of 33