AFAIK, in Python objects are passed by reference, then why do HuggingFace keeps using pointers to pass objects? Example snippet below taken from the tutorial at this link: https://huggingface.co/learn/nlp-course/chapter3/4?fw=pt
raw_inputs = [
"I've been waiting for a HuggingFace course my whole life.",
"I hate this so much!",
]
inputs = tokenizer(raw_inputs, padding=True, truncation=True, return_tensors="pt")
print(inputs)
from transformers import AutoModel
checkpoint = "distilbert-base-uncased-finetuned-sst-2-english"
model = AutoModel.from_pretrained(checkpoint)
outputs = model(**batch) # <-- What does this even mean?
print(outputs.loss, outputs.logits.shape)