# Import necessary libraries | |
from transformers import AutoModel, AutoTokenizer | |
# Load the model and tokenizer | |
model_name = "Rafay17/Llama3.2_1b_customModle2" | |
model = AutoModel.from_pretrained(model_name) | |
tokenizer = AutoTokenizer.from_pretrained(model_name) | |
# Prepare your input text | |
input_text = "Your input text goes here." | |
inputs = tokenizer(input_text, return_tensors="pt") | |
# Forward pass to get model outputs | |
with torch.no_grad(): | |
outputs = model(**inputs) | |
# Do something with the outputs | |
print(outputs) | |