Skip to content

Repository files navigation

Zig: Solving the cross compilation conundrum

Qompass AI on Zig

Repository Views GitHub all releases

Zig
Zig Documentation Zig Tutorials
License: Apache 2.0

Zero the Ziguana Zig Solutions
▶️ Qompass AI Quick Start
curl -fSsL https://raw.githubusercontent.com/qompassai/zig/main/scripts/quickstart.sh | sh
📄 We STRONGLY advise you read the script BEFORE running it 😉
#!/usr/bin/env sh
# /qompassai/zig/scripts/quickstart.sh
# Qompass AI · Zig Quick‑Start (rootless, XDG, portable)
# Copyright (C) 2025 Qompass AI, All rights reserved
####################################################
set -eu
print() { printf '[zig-quickstart]: %s\n' "$1"; }
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
LOCAL_BIN="$HOME/.local/bin"
ZIG_CONFIG="$XDG_CONFIG_HOME/zig"
mkdir -p "$LOCAL_BIN" "$ZIG_CONFIG"
OS="$(uname | tr 'A-Z' 'a-z')"
ARCH="$(uname -m)"
case "$ARCH" in
x86_64 | amd64) ARCH="x86_64" ;;
arm64 | aarch64) ARCH="aarch64" ;;
*)
	print "Unsupported architecture: $ARCH"
	exit 1
	;;
esac
case "$OS" in
mingw* | msys* | cygwin*) OS="windows" ;;
esac
BANNER() {
	printf '╭────────────────────────────────────────────╮\n'
	printf '│    Qompass AI · Zig Quick‑Start            │\n'
	printf '╰────────────────────────────────────────────╯\n'
	printf '    © 2025 Amor Fati Labs. All rights reserved   \n\n'
}
BANNER
ZIG_LATEST="$(curl -fsSL https://ziglang.org/download/index.json | grep -o '"version": *"[^"]*"' | head -1 | cut -d'"' -f4)"
print "Detected latest Zig version: $ZIG_LATEST"
case "$OS" in
linux)
	PLATFORM="linux-$ARCH"
	EXT="tar.xz"
	;;
darwin)
	PLATFORM="macos-$ARCH"
	EXT="tar.xz"
	;;
windows)
	PLATFORM="windows-$ARCH"
	EXT="zip"
	;;
*)
	print "Unsupported or unknown OS: $OS"
	exit 1
	;;
esac
ZIG_BASENAME="zig-$ZIG_LATEST-$PLATFORM"
ZIG_URL="https://ziglang.org/download/$ZIG_LATEST/$ZIG_BASENAME.$EXT"
print "Downloading Zig from: $ZIG_URL"
cd /tmp
curl -fsSL -o "$ZIG_BASENAME.$EXT" "$ZIG_URL"
print "Extracting Zig..."
if [ "$EXT" = "tar.xz" ]; then
	tar -xf "$ZIG_BASENAME.$EXT"
elif [ "$EXT" = "zip" ]; then
	unzip -q "$ZIG_BASENAME.$EXT"
else
	print "Unexpected archive format: $EXT"
	exit 1
fi
print "Installing Zig to $LOCAL_BIN..."
if [ -f "$ZIG_BASENAME/zig" ]; then
	cp "$ZIG_BASENAME/zig" "$LOCAL_BIN/"
	chmod +x "$LOCAL_BIN/zig"
elif [ -f "$ZIG_BASENAME/zig.exe" ]; then
	cp "$ZIG_BASENAME/zig.exe" "$LOCAL_BIN/"
fi
rm -rf "/tmp/$ZIG_BASENAME"*
ZIG_BIN="$LOCAL_BIN/zig"
if [ -x "$ZIG_BIN" ]; then
	print "Installed Zig: $("$ZIG_BIN" version)"
else
	print "Error: Zig binary not found in $LOCAL_BIN"
	exit 1
fi
ZIGRC="$ZIG_CONFIG/zigrc"
if [ ! -f "$ZIGRC" ]; then
	cat >"$ZIGRC" < 

Or, View the quickstart script.

🧭 About Qompass AI

Matthew A. Porter
Former Intelligence Officer
Educator & Learner
DeepTech Founder & CEO

Publications

ORCID ResearchGate Zenodo

Developer Programs

NVIDIA Developer Meta Developer HackerOne HuggingFace Epic Games Developer

Professional Profiles

Personal LinkedIn Startup LinkedIn

Social Media

X/Twitter Instagram Qompass AI YouTube

🔥 How Do I Support
🏛️ Qompass AI Pre-Seed Funding 2023-2025 🏆 Amount 📅 Date
RJOS/Zimmer Biomet Research Grant $30,000 March 2024
Pathfinders Intern Program
View on LinkedIn
$2,000 October 2024

🤝 How To Support Our Mission

GitHub Sponsors Patreon Liberapay Open Collective Buy Me A Coffee

🔐 Cryptocurrency Donations

Monero (XMR):

Monero QR Code
42HGspSFJQ4MjM5ZusAiKZj9JZWhfNgVraKb1eGCsHoC6QJqpo2ERCBZDhhKfByVjECernQ6KeZwFcnq8hVwTTnD8v4PzyH
📋 Copy Address

Funding helps us continue our research at the intersection of AI, healthcare, and education

Frequently Asked Questions

Q: How do you mitigate against bias?

TLDR - we do math to make AI ethically useful

A: We delineate between mathematical bias (MB) - a fundamental parameter in neural network equations - and algorithmic/social bias (ASB). While MB is optimized during model training through backpropagation, ASB requires careful consideration of data sources, model architecture, and deployment strategies. We implement attention mechanisms for improved input processing and use legal open-source data and secure web-search APIs to help mitigate ASB.

AAMC AI Guidelines | One way to align AI against ASB

AI Math at a glance

Forward Propagation Algorithm

$$ y = w_1x_1 + w_2x_2 + ... + w_nx_n + b $$

Where:

  • $y$ represents the model output
  • $(x_1, x_2, ..., x_n)$ are input features
  • $(w_1, w_2, ..., w_n)$ are feature weights
  • $b$ is the bias term

Neural Network Activation

For neural networks, the bias term is incorporated before activation:

$$ z = \sum_{i=1}^{n} w_ix_i + b $$ $$ a = \sigma(z) $$

Where:

  • $z$ is the weighted sum plus bias
  • $a$ is the activation output
  • $\sigma$ is the activation function

Attention Mechanism- aka what makes the Transformer (The "T" in ChatGPT) powerful

The Attention mechanism equation is:

$$ \text{Attention}(Q, K, V) = \text{softmax}\left( \frac{QK^T}{\sqrt{d_k}} \right) V $$

Where:

  • $Q$ represents the Query matrix
  • $K$ represents the Key matrix
  • $V$ represents the Value matrix
  • $d_k$ is the dimension of the key vectors
  • $\text{softmax}(\cdot)$ normalizes scores to sum to 1

Q: Do I have to buy a Linux computer to use this? I don't have time for that!

A: No. You can run Linux and/or the tools we share alongside your existing operating system:

  • Windows users can use Windows Subsystem for Linux WSL
  • Mac users can use Homebrew
  • The code-base instructions were developed with both beginners and advanced users in mind.

Q: Do you have to get a masters in AI?

A: Not if you don't want to. To get competent enough to get past ChatGPT dependence at least, you just need a computer and a beginning's mindset. Huggingface is a good place to start.

Q: What makes a "small" AI model?

A: AI models ~=10 billion(10B) parameters and below. For comparison, OpenAI's GPT4o contains approximately 200B parameters.

License

This project is licensed under the Apache License, Version 2.0.

Copyright 2025 Qompass AI.

About

Equator Zig: Educational Content on the Zig Programming Language

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages