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") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("AXERA-TECH/Laya", device_map="auto")How to use AXERA-TECH/Laya with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js