Lexi-100K

Lexi-100K is a tiny English keyword and entity tagger trained with PyTorch and designed to run entirely on Roblox servers in Luau. Runtime inference needs no HTTP requests, API keys, or external AI service.

Model details

  • Parameters: 404,684
  • Architecture: 32-dimensional word and hashed character-ngram embeddings, a five-token context window, and a 64-neuron hidden layer
  • Labels: O, FOOD, GAME, ANIMAL, PERSON, PLACE, TIME, OBJECT, ITEM, ACTIVITY, EMOTION, OTHER
  • Roblox export: signed int8 tensors encoded as base64 Luau
  • Runtime tensor size: approximately 405 KB
  • Recommended confidence threshold: 0.75
  • Adjacent same-type tokens are merged into complete spans such as New York
  • Curly apostrophes are normalized identically in Python and Luau
  • Unseen capitalized names can be recognized from strong person context without a name database

Files

  • model.pt โ€” full PyTorch checkpoint
  • vocabulary.json โ€” learned 4,096-token vocabulary
  • metrics.json โ€” synthetic validation metrics
  • benchmark.json โ€” independent 86-case challenge benchmark
  • roblox-benchmark.json โ€” results measured in Roblox Studio server Luau
  • ModelWeights.lua โ€” directly embeddable int8/base64 Roblox weights

Results

On the independent 86-case English challenge set, full-precision Python, dequantized int8 Python, and the Roblox Luau runtime produced the same results at threshold 0.75:

Metric Result
Precision 99.24%
Recall 100%
F1 99.62%
Exact sentences 85 / 86
Type accuracy 97.69%
Roblox average latency 1.523 ms
Roblox throughput ~657 inferences/s
Roblox Luau tests 11 / 11 passed

The challenge set is small and curated, so these numbers are not evidence of broad language understanding. Unrepresented slang, languages other than English, unusual spelling, and concepts outside the training domains can fail.

Use

The complete training code, Luau inference runtime, server endpoint, tests, and UI are available in the GitHub repository. You can also play or copy the Roblox experience.

Python example after cloning the source repository:

pip install -e .
python -m lexi.predict "Guus played Roblox with Riley on Friday"

Roblox usage:

local result = game.ReplicatedStorage.Remotes.AnalyzeText:InvokeServer(
    "Guus played Roblox with Riley on Friday"
)

Training data and limitations

Lexi combines deterministic, domain-specific generated examples with 10,000 short, safety-filtered English prompts from OpenAssistant OASST1 (Apache-2.0). OASST1 text is conservatively weak-labeled and is never treated as authoritative keyword truth. The independent benchmark is excluded from all training paths.

The open-name fallback stores no names. It only promotes an unknown capitalized token when its nearby words provide a strong person role, while known entities remain under the neural model's type prediction.

Lexi is an experimental keyword tagger, not a moderation or safety system. Roblox text shown to other players must still be filtered with Roblox TextService.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train exnivo/lexi-100k