Add Python inference example 5acccb6
yongqiang commited on
How to use AXERA-TECH/Laya with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="AXERA-TECH/Laya") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("AXERA-TECH/Laya", device_map="auto")