Update README.md
Browse files
README.md
CHANGED
@@ -51,6 +51,12 @@ const model = await AutoModel.from_pretrained(MODEL_ID, {
|
|
51 |
> This may not be the best way but the documentation is truly lacking and this does the job :-P
|
52 |
|
53 |
```typescript
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* Collect attentions across layers from a model.forward(...) output.
|
56 |
*
|
|
|
51 |
> This may not be the best way but the documentation is truly lacking and this does the job :-P
|
52 |
|
53 |
```typescript
|
54 |
+
/**
|
55 |
+
* Minimal attention tensor shape we rely on.
|
56 |
+
* Only `dims` and `data` are used (dims = [B=1, H, T, T]).
|
57 |
+
*/
|
58 |
+
type XtTensor = { dims: number[]; data: ArrayLike<number | bigint> };
|
59 |
+
|
60 |
/**
|
61 |
* Collect attentions across layers from a model.forward(...) output.
|
62 |
*
|