# 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.

```gizlang
import * as Text from "gizai/models/ardy/text";
```

## Types

### `Text`

```gizlang
type Text = { model: LlmState.Model; known: Map<string, Vec<f32>>; }
```

The text encoder and the vectors of the prompts it has read.

- `model`: `M53.Model`
- `known`: `_gizlang_sdk_collections.Map<string, Vec<f32>>`

## Functions

### `folderIn`

```gizlang
function folderIn(hub: Hub.Hub): string throws string
```

The converted encoder in `hub`: downloaded and converted once.

Effects: fail, read, write, console, io, alloc.

### `load`

```gizlang
function load(folder: string, gpu: Option<Gpu>, after: i64 = 0): Text throws string
```

The 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`

```gizlang
function Text.vector(self: mut Text, prompt: string): Vec<f32> throws string
```

The vector of `prompt` (TEXT values), read once.

Effects: fail, read, write, console, io, alloc.

