Skip to content

FlexDM

Checkpoints Inputs
1000luca/FlexDM-LoRA-v2.1 text

FlexDM-LoRA-v2.1 is a LoRA adapter on google/gemma-4-31B-it. Flide reads the base checkpoint and runs the adapter beside its weights, as peft does, with no extra package. The repository's served copy repeats each k_proj LoRA as v_proj on Gemma's full-attention layers, where the values are the keys; Flide reads those layers as transformers does and leaves the copies out.

Flide asks it as the release's VllmLoraReader does, in its header layout. Each question is a chat prompt of its own with one user turn and thinking off. The turn lists the request's questions under "Questions that will be asked about the context:", one "- " line each, then "Context:" and the state, then the question and its options, (A) to (J), or past 10 options a single-token label each; the model's turn opens with "Answer: (". A state that is not a string is written as JSON, and an array of 8 or more items writes each item's index into it. A request whose prompts come to at most 3,000 tokens is read with every user turn written twice, the copy opened by "Read the same input again before answering:". A question whose top probability is then below 0.6 is read once more with its options in reverse order, and the two distributions are averaged.

The answer is the softmax over the option labels' logits after Gemma's soft cap, divided by T = 10.9757 - 1.7016 ln n for a choice of n options and by 10.732 for a noul. Everything up to the state is the same for every question, so Flide computes it once and forks it into the questions, and the reversed round forks from it again.

Speed

On one H200, one request at a time, Flide answers 1.1 to 2.8 times faster than the release's VllmLoraReader on vLLM 0.30.0, which quantizes the base to FP8 at load and runs the adapter unmerged. Each workload is 32 requests, each run once on both sides before timing, and the table gives the median latency of a request. MultiRC requests ask about 49 questions each.

Workload Flide Release Speedup
Decision Index 213.0 ms 232.3 ms 1.1×
RACE 91.4 ms 111.1 ms 1.2×
MultiRC 826.7 ms 1634.8 ms 2.0×
QuALITY long 457.3 ms 1264.3 ms 2.8×

Start a server

flide serve --model 1000luca/FlexDM-LoRA-v2.1

Limits

A request takes choice questions of 2 to 255 options and noul questions. Each prompt takes up to 131,071 tokens, and a longer one refuses the whole request. The model reads text only, so a request with images is refused.