# Apsi > Apsi 2.4.4 is a programming language for AI and physics: physical units checked before running, a native compiler, exact PyTorch conversion, reinforcement learning, science libraries and an official library registry (.apsil). Developed by ATEC. Every documentation page is available as Markdown by adding `.md` to its address. ## Start here - [Getting started](https://apsi.dev/docs/getting-started.md): This guide takes you from installation to a first program, a first trained model and a first library in about ten minutes. - [Write Apsi your way](https://apsi.dev/docs/write-apsi.md): Apsi is designed so that you do not have to learn a new language before you are productive. - [Install on Windows](https://apsi.dev/docs/install.md): After installing, run apsi doctor to check your machine against these targets. Download: the Windows installer, the Linux installer (ApsiSetup-2.4.4-linux.sh) and the .deb are on apsi.dev/download, each with its SHA-256. - [Install on Linux](https://apsi.dev/docs/install-linux.md): Works on every x86-64 distribution with glibc 2.17 or newer, such as Ubuntu 18.04+, Debian 10+, Fedora, Arch, openSUSE, Mint and Pop!OS (the shell installer also on ARM, and in WSL on Windows). - [Troubleshooting](https://apsi.dev/docs/troubleshooting.md): This page covers the problems people most often hit right after installing Apsi, with the exact commands to fix them. Why it happens. - [Versions compared](https://apsi.dev/docs/versions.md): 2.4.4 for everything new. Programs written for 2.0.0 and 1.10.0 run on 2.4.4 unchanged — each version only adds. - [What's new in 2.4.4](https://apsi.dev/docs/whats-new.md): This page walks through everything 2.4.4 adds, with a working example for each part, the numbers we measured, and the limits you should know about. - [Project overview](https://apsi.dev/docs/overview.md): Apsi is a programming language for AI, physics and servers. Physical units, tensor-shape checking, automatic differentiation, number formats from FP64 down to FP4, data pipelines and a hardened HTTP server are built into the language. - [Licensing](https://apsi.dev/docs/licensing.md): Apsi is published under the Apsi License 2.0 (the LICENSE file). This page explains it in plain words with examples. ## The language - [Everything on one page](https://apsi.dev/docs/reference.md): This page is the whole language in one place: every piece of syntax with a short example, then every built-in function, every standard module and every member, and every command of Apsi 2.4.4. - [Language reference](https://apsi.dev/docs/language.md): Apsi 2.4.4 · source files use the extension .apsi and the UTF-8 encoding. - [Native compiler](https://apsi.dev/docs/native.md): Apsi compiles functions to machine code. - [Maximum performance — and why](https://apsi.dev/docs/best-performance.md): Apsi programs are correct by default. Being fast as well depends on a handful of habits. Each one below says what to do, why (what happens inside Apsi), and how big the difference is. - [Hardware & performance](https://apsi.dev/docs/performance.md): About speed: f64/f32/f16 use the CPU's instructions directly. In the current runtime BF16/FP8/FP6/FP4/INT4 are stored as real-size codes (saving RAM, SSD and bandwidth in proportion to the bits) and decoded to FP32 for computing. - [Number formats (f64 … FP8)](https://apsi.dev/docs/numbers.md): Apsi tensors can hold six floating-point formats and the usual integer ones. - [Permissions & security](https://apsi.dev/docs/security.md): Apsi assumes any program might be hostile, including one you downloaded, one an AI wrote, or a dependency of either. The defences are layered. ## AI - [AI and machine learning](https://apsi.dev/docs/ai.md): Apsi does not force a ready-made architecture on you. Every network is an ordinary function that takes a "parameter tree" (record / list / struct), and grad differentiates with respect to every parameter in it. - [Layers](https://apsi.dev/docs/layers.md): use layers builds neural networks of any architecture out of small, composable layers: plain stacks, residual networks, any directed acyclic graph (several inputs and outputs, shared weights), convolutional and recurrent networks. - [Graphs that reach far](https://apsi.dev/docs/graphs.md): Graph neural networks pass messages along edges: one layer moves information one hop. - [From Python and PyTorch](https://apsi.dev/docs/python.md): apsi convert translates Python files — or whole projects — into Apsi with Python's exact semantics: the converted program prints the same text, raises the same errors, byte for byte. - [Reinforcement learning](https://apsi.dev/docs/rl.md): use rl provides environments, advantage estimation, policy helpers, complete training algorithms (PPO, DQN, REINFORCE), the losses used to train language models from human preferences (RLHF, DPO, IPO, GRPO), beam search. - [Model files](https://apsi.dev/docs/model-files.md): Apsi saves and loads models in the formats the rest of the ecosystem uses, and in its own checkpoint format (.apsim) for everything those formats cannot hold: physical units, compressed tensors, the shape of the parameter tree. - [Large models & clusters](https://apsi.dev/docs/scale.md): Training a 21B, 500B, 1T or 2T-parameter model is decided by arithmetic before any code runs: how much memory each GPU needs, how the model must be split, how many GPUs, and how many days. - [Backends](https://apsi.dev/docs/backends.md): Every model built with use layers runs on two backends without changing a line of the model: - [Fewer AI tokens](https://apsi.dev/docs/tokens.md): Language models charge by the token and read slower the more they get. - [Hugging Face models](https://apsi.dev/docs/hub.md): use hub downloads models from the Hugging Face Hub, tokenizes text and runs the models natively — embeddings, classification, named entities, fill-mask and text generation — with Apsi's own code. - [RAM, SSD and GPU](https://apsi.dev/docs/memory.md): Big data and big models run out of memory in the middle of the night. ## Real time & data - [Real time and video](https://apsi.dev/docs/realtime.md): use rt runs work on time: control loops at 1–2 kHz with microsecond accuracy, many periodic tasks on one scheduler, and video pipelines from 640×480 to 3840×2160 with the lowest possible latency. - [Tables](https://apsi.dev/docs/dataframe.md): A columnar table engine built into Apsi: typed columns, whole-column kernels, no per-cell objects. It reads CSV, JSON and JSON Lines, filters, groups, joins, sorts and writes, with an API close to Polars. - [Databases](https://apsi.dev/docs/databases.md): PostgreSQL, MySQL / MariaDB, MongoDB, Redis and SQLite clients built into Apsi's runtime — nothing to install, no driver to compile. ## Science - [Science, physics & medicine](https://apsi.dev/docs/science.md): Apsi ships the numerical tools of a research lab as standard modules. ## Ecosystem - [Libraries (.apsil)](https://apsi.dev/docs/libraries.md): Apsi libraries are distributed as .apsil files through the official registry. One command installs the newest version, every file is verified, and a library is used exactly like a standard module. - [Publishing to apsi.dev](https://apsi.dev/docs/website.md): Everything on the website can be added and removed from the command line on any computer, or with the server command when you are on the server itself. - [C, C++ and Python interop](https://apsi.dev/docs/interop.md): Apsi keeps a clear border between its own world and the outside: values that cross it are converted by fixed rules (quantities with units always travel as {"value": ..., "unit": "..."}). - [HTTP and WebSocket servers](https://apsi.dev/docs/server.md): Measured — a synthetic benchmark (a route that returns a fixed 25-byte JSON object, keep-alive, the Go load generator in benchmarks/web on the same machine): - [.env, secrets and venvs](https://apsi.dev/docs/env.md): The file format is the one python-dotenv and Docker Compose read: KEY=value, export KEY=value, single and double quotes, multi-line double-quoted values, \n escapes in double quotes, # comments, and ${OTHER} expansion. - [Debugging](https://apsi.dev/docs/debugging.md): Apsi has a real debugger: breakpoints, stepping, the call stack, variables and tensors — in VS Code and the other VS Code-family editors (F5) or in the terminal. - [Editors](https://apsi.dev/docs/editors.md): Apsi works in the editors people already use. - [Building from source](https://apsi.dev/docs/build.md): Linux release files that need no internet and no Node.js (any Linux, also WSL): - [Playground](https://apsi.dev/docs/playground.md): The playground/ folder is a web page that runs Apsi in the browser with no server doing the work. It uses Pyodide (CPython compiled to WebAssembly) and numpy entirely on the visitor's machine, so it can be put on the official website as is. ## Optional - [All documentation in one file](https://apsi.dev/llms-full.txt) - [Library publishing guide](https://apsi.dev/libraries/publish) - [Benchmarks](https://apsi.dev/benchmarks) - [License](https://apsi.dev/license.md)