Livt packages

Livt.ML

Version 1.6.1

Fixed-size quantized inference, tensor storage, attention, and transformer building blocks for Livt.

Published files (132)

src/embedding/PositionEmbedding8x64Stream.lvt

namespace Livt.ML.Embedding

/**
 * Context-eight position-table specialization of Embedding64Stream.
 */
component PositionEmbedding8x64Stream
{
	// Compile-time dimensions, bounds, and numeric constants.
	public const POSITION_COUNT: int = 8

	// Owned embedding worker with forwarded external handshakes.
	stream: Embedding64Stream

	/**
	 * Owns an Embedding64Stream for 8 rows and forwards the supplied memory and toggle-
	 * handshake ports. External memory must be initialized before requesting a row.
	 */
	new(
		positionRequest: in logic, positionIndex: in int,
		positionAcknowledge: out logic, memoryRequest: out logic,
		memoryAddress: out int, memoryData: in int, memoryAcknowledge: in logic,
		outputRequest: out logic, outputData: out int, outputLast: out logic,
		outputAcknowledge: in logic, invalidPosition: out logic)
	{
		this.stream = new Embedding64Stream(
			POSITION_COUNT, positionRequest, positionIndex, positionAcknowledge,
			memoryRequest, memoryAddress, memoryData, memoryAcknowledge,
			outputRequest, outputData, outputLast, outputAcknowledge, invalidPosition)
	}
}