Alchemai LFM2.5 1.2B Instruct

Alchemai is a fine-tuned LLM designed to power alchemy-style games. Given two elements as input, it predicts what new element would result from combining them - just like classic alchemy games where you combine "fire" and "water" to get "steam".

This model transforms a LLM into a creative game engine that can run entirely in your browser, enabling interactive alchemy gameplay without server-side processing.

tldr: it's like Infinite Craft but runs locally in your browser.

Play Alchemai

Play on HF Spaces

The Intersection of LLMs and Browser Gaming

This project explores an experimental paradigm: using a compact LLMs as a game mechanic engine rather than a conversational assistant. Traditional combinatory games like alchemy use hardcoded lookup tables for combinations. Alchemai demonstrates how compact LLMs can:

  1. Learn patterns from thousands of element combination recipes
  2. Generalize to suggest logical combinations for unseen element pairs
  3. Run locally even in the browser via quantized ONNX, enabling offline, private and zero cloud cost gameplay
  4. Scale creativity - the model can propose unexpected yet sensible combinations

This project also serves as a demonstation of the rapid evolution of compact LLMs or Small Language Models (SLMs). What required expensive API calls to massive proprietary models just two years ago can now run smoothly entirely on the client side. This shift bridges generative AI and game design-the model becomes part of the game's core logic, not just a gimmick, unlocking creative and serverless gameplay.

Model Details

Prompting Format

The model uses the standard ChatML-style template:

<|im_start|>user
{element_a} + {element_b}<|im_end|>
<|im_start|>assistant
{result_element} {emoji}<|im_end|>

Example Usage

Input:

<|im_start|>user
fire + water<|im_end|>
<|im_start|>assistant

Output:

steam 💨

Inference Parameters

Recommended for deterministic yet creative outputs:

  • temperature: 0.45
  • top_p: 0.9
  • max_new_tokens: 32

ONNX Version for Browser

A quantized ONNX version is available for running directly in the browser:

alpaim/alchemai-LFM2.5-1.2B-Instruct-ONNX

WebUI built with Transformers.js, enabling client-side inference without any backend server.

Coming Soon

  • Full training dataset release
  • Complete fine-tuning pipeline documentation
  • Additional model variants and alternative fine-tuning approaches
Downloads last month
7
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for alpaim/alchemai-LFM2.5-1.2B-Instruct

Finetuned
(30)
this model
Quantizations
1 model

Space using alpaim/alchemai-LFM2.5-1.2B-Instruct 1