Table of Contents

Property InputIds

Namespace
Qavren.Edge.Embeddings.Onnx
Assembly
Qavren.Edge.Embeddings.Onnx.dll

InputIds

Row-major and flat over its first BatchSize * SequenceLength elements: row b occupies [b * SequenceLength, (b+1) * SequenceLength). That is exactly the layout OrtValue.CreateTensorValueFromMemory expects, so no reshape happens anywhere.

The array may be LONGER than BatchSize * SequenceLength. The three buffers a batch from EncodeBatch(IReadOnlyList<string>, int, IReadOnlyList<int>) carries are rented from ArrayPool<T>.Shared, which returns a buffer AT LEAST the requested size. Read BatchSize * SequenceLength elements, never InputIds.Length. Spec 7's declaration of this record annotates the three arrays [BatchSize * SequenceLength], which describes the WINDOW rather than the allocation; that sentence needs the edit, and the pooling it describes away is mandated by the plan's Step 6.

public long[] InputIds { get; init; }

Property Value

long[]