ONNX Model Zoo

Pereki/autotrain-a6i98-d578q

By Pereki · ↓ 8 · ♥ 0 · Updated 2024-03-23

What's in this repo

This page lists the files in Pereki/autotrain-a6i98-d578q, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 29 files, including 11 .json, 3 .bin, 2 .md, 2 .safetensors, 2 .pt, 2 .model
  • Last updated 2024-03-23

ONNX files

File Size Download
model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Model Trained Using AutoTrain

This model was trained using AutoTrain. For more information, please visit AutoTrain.

Usage


from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "PATH_TO_THIS_REPO"

tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
    model_path,
    device_map="auto",
    torch_dtype='auto'
).eval()

# Prompt content: "hi"
messages = [
    {"role": "user", "content": "hi"}
]

input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
output_ids = model.generate(input_ids.to('cuda'))
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)

# Model response: "Hello! How can I assist you today?"
print(response)

Model info

text-generation transformers
transformers tensorboard onnx safetensors distilbert text-classification autotrain text-generation peft license:other endpoints_compatible region:us
↓ 8 ♥ 0

Created: 2024-03-23

Updated: 2024-03-23

View on Hugging Face

Files (29)

.gitattributes
README.md
adapter_config.json
adapter_model.safetensors
checkpoint-159/README.md
checkpoint-159/adapter_config.json
checkpoint-159/adapter_model.safetensors
checkpoint-159/optimizer.pt
checkpoint-159/pytorch_model.bin
checkpoint-159/rng_state.pth
checkpoint-159/scheduler.pt
checkpoint-159/special_tokens_map.json
checkpoint-159/tokenizer.json
checkpoint-159/tokenizer.model
checkpoint-159/tokenizer_config.json
checkpoint-159/trainer_state.json
checkpoint-159/training_args.bin
config.json
handler.py
model.onnx ONNX
requirements.txt
runs/Mar23_13-13-43_r-pereki-ki-wsd36jc9-beb47-se1qc/events.out.tfevents.1711199624.r-pereki-ki-wsd36jc9-beb47-se1qc.75.0
special_tokens_map.json
test.py
tokenizer.json
tokenizer.model
tokenizer_config.json
training_args.bin
training_params.json

Related models