Skip to content

Commit

Permalink
Add adapter file format
Browse files Browse the repository at this point in the history
  • Loading branch information
natke committed Nov 17, 2024
1 parent 89b0a59 commit 39b5a8e
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions docs/genai/reference/adapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Adapter file spec
description: Specification for the .onnx_adapter file format
has_children: false
parent: Reference
grand_parent: Generate API (Preview)
nav_order: 1
---

# Adapter file specification


## File format

The adapter file format is flatbuffers

## File extension

The file extension is ".onnx_adapter"

## Schema

The schema for the file is as follows

```
File:=
format_version := integer
adapter_version := integer
model_version := integer
[parameter := Parameter]
```

```
Parameter:=
name := string
dimensions := [int64]
data_type := TensorDataType
[data := uint8]
```

```
TensorDataType:=
UNDEFINED = 0 |
FLOAT = 1 |
UINT8 = 2 |
INT8 = 3 |
UINT16 = 4 |
INT16 = 5 |
INT32 = 6 |
INT64 = 7 |
STRING = 8 |
BOOL = 9 |
FLOAT16 = 10 |
DOUBLE = 11 |
UINT32 = 12 |
UINT64 = 13 |
COMPLEX64 = 14 |
COMPLEX128 = 15 |
BFLOAT16 = 16 |
FLOAT8E4M3FN = 17 |
FLOAT8E4M3FNUZ = 18 |
FLOAT8E5M2 = 19 |
FLOAT8E5M2FNUZ = 20
```

0 comments on commit 39b5a8e

Please sign in to comment.