File size: 369 Bytes
72d2877
 
c388a3e
 
 
 
 
 
 
 
 
 
72d2877
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import streamlit as st

from transformers import AutoTokenizer, FalconModel
import torch

tokenizer = AutoTokenizer.from_pretrained("Rocketknight1/falcon-rw-1b")
model = FalconModel.from_pretrained("Rocketknight1/falcon-rw-1b")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state