AIF is the compiled AI infrastructure object format and language/compiler package for AInfra source.
This repo contains:
- Rust lexer
- Rust parser
- compiler validation
- AIF writer
- Rust optimizer dependency used by the compiler
- AIF format docs
- language docs
- examples
- Git
- Rust stable toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shgit clone https://github.com/TangibleResearch/AIF.git
cd AIF
cargo build --manifest-path ainfra-compiler/Cargo.toml --lockedcargo run --manifest-path ainfra-compiler/Cargo.toml -- examples/local-stub.ainfra -o /tmp/local-stub.aifThe compiler emits an AIF file that can be loaded by InfraVM.
import ai.local.ollama
// $start$
model local {
engine = "ollama"
name = "llama3.2"
}
prompt answer {
text = "Answer clearly and briefly: {input}"
}
agent helper {
model = local
prompt = answer
}
run agent helper on "What is PointRun?"
docs/language.mddocs/aif-format.mdlanguage.md
GitHub Actions in .github/workflows/ci.yml builds the Rust compiler and compiles the local example into an AIF file.
MIT