gizai/models/ardy/text
ARDY's text encoder, LLM2Vec of Llama 3 8B Instruct (McGill-NLP's MNTP and supervised LoRA adapters merged at conversion) on gizai/llm. The prompt is a user turn of Llama 3's chat format, as LLM2Vec trained its supervised adapter (and as ARDY reads its text from local folders; from the hub's names LLM2Vec leaves the turn out). Every token sees every other (a bidirectional pass), and the prompt's vector is the mean of the rows of its words and its end of turn after the final norm.
import * as Text from "gizai/models/ardy/text";Types
Text
type Text = { model: LlmState.Model; known: Map<string, Vec<f32>>; }The text encoder and the vectors of the prompts it has read.
model:M53.Modelknown:_gizlang_sdk_collections.Map<string, Vec<f32>>
Functions
folderIn
function folderIn(hub: Hub.Hub): string throws stringThe converted encoder in hub: downloaded and converted once.
Effects: fail, read, write, console, io, alloc.
load
function load(folder: string, gpu: Option<Gpu>, after: i64 = 0): Text throws stringThe encoder of folder (folderIn's) on gpu (none: the host); after: the bytes the models it serves load after
it (encoderModel).
Effects: fail, read, write, console, io, alloc.
Methods
Text.vector
function Text.vector(self: mut Text, prompt: string): Vec<f32> throws stringThe vector of prompt (TEXT values), read once.
Effects: fail, read, write, console, io, alloc.