File size: 517 Bytes
e8ec2f9
 
93396ac
 
e8ec2f9
 
 
a3af99d
e8ec2f9
 
 
a3af99d
e8ec2f9
 
 
93396ac
e8ec2f9
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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)