Spaces:
Paused
Paused
File size: 1,200 Bytes
a2fd648 7f0b422 a2fd648 7f0b422 a2fd648 7f0b422 a2fd648 7f0b422 a2fd648 7f0b422 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
---
license: mit
tags:
- amop-optimized
- onnx
---
# AMOP-Optimized ONNX Model: {repo_name}
This model was automatically optimized for CPU inference using the **Adaptive Model Optimization Pipeline (AMOP)**.
- **Base Model:** [{model_id}](https://huggingface.co/{model_id})
- **Optimization Date:** {optimization_date}
## Optimization Details
The following AMOP ONNX pipeline stages were applied:
- **Pruning:** {pruning_status} (Percentage: {pruning_percent}%)
- **Quantization & ONNX Conversion:** Enabled ({quant_type} Quantization)
## How to Use
This model is in ONNX format and can be run with `optimum-onnxruntime`. Make sure you have `optimum`, `onnxruntime`, and `transformers` installed.
```python
from optimum.onnxruntime import ORTModelForCausalLM
from transformers import AutoTokenizer
model_id = "{repo_id}"
model = ORTModelForCausalLM.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
prompt = "The future of AI is"
inputs = tokenizer(prompt, return_tensors="pt")
gen_tokens = model.generate(**inputs)
print(tokenizer.batch_decode(gen_tokens))
```
## AMOP Pipeline Log
<details>
<summary>Click to expand</summary>
```
{pipeline_log}
```
</details> |