Is Transformers using GPU by default? Hugging Face Transformers models loaded with AutoModelForSequenceClassification.from_pretrained() start on the CPU, not the GPU, so the model must be moved to "cuda:0" once and each tokenized batch moved to the same device, according to a Hugging Face documentation-based walkthrough. For 10,000 sentences, the walkthrough recommends starting with batches of 32 and measuring sentences per second, since short one-at-a-time predictions make a one-minute GPU utilization average hard to interpret. If utilization still looks low, printing model.device and inputs["input_ids"].device inside the loop should both show cuda:0. With AutoModelForSequenceClassification.from pretrained as shown above, the model starts on the CPU. Move it to cuda:0 once, then move each batch of tokenized inputs to the same device. For 10,000 sentences, I’d start with batches of 32 and measure sentences per second. Short, one-at-a-time predictions can make a one-minute GPU utilization average hard to interpret. Hugging Face https://huggingface.co/docs/transformers/pipeline tutorial?utm source=chatgpt.com python import torchmodel = model.to "cuda:0" .eval batch size = 32predictions = with torch.inference mode : for start in range 0, len sentences , batch size : batch = sentences start : start + batch size inputs = tokenizer batch, padding=True, truncation=True, return tensors="pt" .to model.device label ids = model inputs .logits.argmax dim=-1 .cpu .tolist predictions.extend model.config.id2label i for i in label ids If utilization still looks low, print model.device and inputs "input ids" .device inside the loop. Both should show cuda:0 .