Skip to main content

Fjällstation

"Fjällstation is the mountain station at the foot of Kebnekaise, where you prepare before the climb."

A data and RL environment API for LLM training in the built environment.

What you get

Call What you get
fjallstation.Corpus() domain text, for training on raw text
fjallstation.Instruct() chats with questions and answers, for supervised fine-tuning (SFT)
fjallstation.Env() modelling tasks with a reward, for reinforcement learning (RL)

Env() runs on two more parts of the package: a task image (OpenModelica with its libraries) and a server (it gives the tasks and the rewards).

You bring the data: one folder in a simple format. The same parts run on one workstation or on several machines.

Quick start

You need Python 3.10 or later and Docker. Tested on Linux.

pip install fjallstation
fjallstation image                    # build the task image; the first build takes some minutes
fjallstation example ./store          # the example store: five texts, five chats, five tasks
fjallstation server --store ./store   # the server; keep it running in this terminal

Then your training code uses it. A mock-up: the model, the agent and the training steps are yours.

import fjallstation

llm = load_your_llm()

# 1. Training on raw domain text
for doc in fjallstation.Corpus():
    llm.train_on_text(doc["text"])

# 2. SFT on chats
for row in fjallstation.Instruct():
    llm.train_on_chat(row["messages"])

# 3. RL on tasks with a reward
env = fjallstation.Env()
for episode in range(1000):
    task = env.reset()                             # a task and a fresh container
    agent = Agent(llm, task.prompt)                # your agent: the LLM with a shell
    while agent.works():
        output = env.exec(agent.next_command()).output
        agent.read(output)
    result = env.step(agent.final_model())         # the container tries the model; the server scores it
    llm.learn(agent.steps, result.reward)          # 1.0 for a correct model; 0 to 0.3 for how far another one got

A first episode that you can run is in the documents.

Documents

  • The data folder: the format, the examples, and how to make tasks of your own.
  • One episode, step by step: a first episode with Python and with a shell, who runs as whom, and use on several machines.
  • The reward: the two parts of the reward and the rule behind them.

Licence

Apache 2.0, see LICENSE. The task image installs OpenModelica and Modelica libraries; they have their own licences. Two example tasks use open datasets under CC BY 4.0; their credit is in the task text and in the data document.

Metadata

Release files for fjallstation 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fjallstation 0.1.2
File Size Uploaded Provenance Actions
fjallstation-0.1.2.tar.gz 438.1 kB Without provenance Details for fjallstation-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fjallstation 0.1.2
File Interpreter ABI Platform Actions
fjallstation-0.1.2-py3-none-any.whl Python 3 none any Details for fjallstation-0.1.2-py3-none-any.whl

Total release size: 866.3 kB

Release files / fjallstation-0.1.2.tar.gz

Download URL fjallstation-0.1.2.tar.gz
Size 438.1 kB
Tags Source
SHA-256 checksum
How to use checksums
35103633f1f15af670b53b6fbad256dfe2e3f64be94d5fee1341ea214fb6efb1
BLAKE2b-256 checksum
How to use checksums
c2a3e0d44ae4d3012c7e02af8b4e1014d157cc903919fff4c3df8458820e434f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / fjallstation-0.1.2-py3-none-any.whl

Download URL fjallstation-0.1.2-py3-none-any.whl
Size 428.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef31dab16e2cfd00cc001932ac9583a099120cdff69bc24792b2845503ea1f56
BLAKE2b-256 checksum
How to use checksums
2a6e3900790bb1dd2d35182f729c1519692180ff8cad63b19897a27f4694cc77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for fjallstation 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page