ONNX Model Zoo

Talha01/LLMModel

By Talha01 · ↓ 0 · ♥ 0 · Updated 2024-11-05

What's in this repo

This page lists the files in Talha01/LLMModel, including model.onnx, model_fp16.onnx, model_q4.onnx and more.

  • 4 ONNX models (.onnx files)
  • 21 files, including 10 .json, 4 .onnx, 1 .md, 1 .txt, 1 .safetensors, 1 .0
  • Last updated 2024-11-05

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_fp16.onnx — Download
onnx/model_q4.onnx — Download
onnx/model_q4f16.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

TalhaLLM

Table of Contents

  1. Model Summary
  2. Limitations
  3. Training
  4. License
  5. Citation

How to use

Transformers

pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceTB/SmolLM2-135M-Instruct"

device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)

messages = [{"role": "user", "content": "What is gravity?"}]
input_text=tokenizer.apply_chat_template(messages, tokenize=False)
print(input_text)
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True)
print(tokenizer.decode(outputs[0]))

Model info

text-generation transformers
transformers tensorboard onnx safetensors llama text-generation conversational en license:apache-2.0 text-generation-inference endpoints_compatible region:us
↓ 0 ♥ 0

Created: 2024-11-05

Updated: 2024-11-05

View on Hugging Face

Files (21)

.gitattributes
README.md
all_results.json
config.json
eval_results.json
generation_config.json
merges.txt
model.safetensors
onnx/model.onnx ONNX
onnx/model_fp16.onnx ONNX
onnx/model_q4.onnx ONNX
onnx/model_q4f16.onnx ONNX
runs/Oct31_10-14-22_ip-26-0-174-36/events.out.tfevents.1730370128.ip-26-0-174-36.3239327.0
runs/Oct31_10-14-22_ip-26-0-174-36/events.out.tfevents.1730376056.ip-26-0-174-36.3239327.1
special_tokens_map.json
tokenizer.json
tokenizer_config.json
train_results.json
trainer_state.json
training_args.bin
vocab.json

Related models