Skip to content

About

WebAI's 3B AI BEAST: Beats GPT-OSS 120B Offline on iPhone! - Local 3B formal logic reasoning engine outperforming 120B models on edge hardware.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🧠 TwIL-LM3 Chain-of-Thought Visualizer

Python 3.10+ Model TwIL-LM3 License WebAI

A specialized 3B parameter reasoning engine from webAI Intelligence Lab that outreasons OpenAI's 120B gpt-oss model on 4 of 5 formal reasoning benchmarks while running locally on edge consumer hardware (from an iPhone to a Raspberry Pi).

⚡ 3-Step Workflow

Step 1: Input 📥 Step 2: AI Action ⚙️ Step 3: Result 📊
Supply formal logic rules, policy text, or premise statements. TwIL engine generates <think> reasoning traces and validates logic steps. Produces side-by-side comparison report with step metrics and answer accuracy.

🌟 Primary Model Powers & Highlights

  • 40x Parameter Efficiency: Outperforms OpenAI's gpt-oss-120b (120B params) on 4/5 formal reasoning benchmarks at just 3B parameters.
  • 2.6x Faster Inference: Delivers 2.6x faster completed answer throughput compared to 120B frontier models.
  • Proprietary Verified Datasets: Trained on webAI-owned, verified logic corpora rather than raw scraped web text.
  • Edge & Mobile Native: Designed to execute fully offline on consumer hardware, from iPhones and Raspberry Pis to local workstations.
  • Specialized Deductive Reasoning: Built specifically for formal logic, rule induction, contract auditing, tool calling, and AI agent verification.

🛠️ Technology Stack

  • Core Engine: Python 3.10+
  • Inference Runtime: Local Ollama API (twil-lm3:3b) / Hugging Face transformers & llama.cpp
  • Target Model: webAI-Official/TwIL-LM3 (SmolLM3-3B Reasoning Derivative)
  • Output Report: Structured Markdown Benchmarks (outputs.md)

📂 Project Structure

WebAI Twil/
├── README.md                          # Comprehensive user documentation & setup guide
├── main.py                            # Primary execution pipeline & logic benchmark engine
├── download_and_register_twil.py      # Automated script to download weights & register model in Ollama
└── README (94).md                     # Official Hugging Face model specification sheet

📥 How to Download & Register TwIL-LM3 Model in Ollama

You can easily register twil-lm3:3b in your local Ollama runtime whenever you are ready:

Option A: Automated Python Registration Script

Run the included download script to fetch TwIL-LM3-Q4_K_M.gguf (1.91 GB) from Hugging Face and register it automatically:

python download_and_register_twil.py

Option B: Manual Command-Line Registration

  1. Download TwIL-LM3-Q4_K_M.gguf directly from webAI-Official/TwIL-LM3 on Hugging Face.
  2. Save the GGUF file in your project folder.
  3. Create a Modelfile with the following contents:
    FROM ./TwIL-LM3-Q4_K_M.gguf
    PARAMETER stop "<|im_end|>"
    PARAMETER stop "<|endoftext|>"
  4. Register the model in Ollama:
    ollama create twil-lm3:3b -f Modelfile

📱 Edge Device Deployment (iPhone & Raspberry Pi)

1. iPhone (iOS Setup)

TwIL-LM3's compact GGUF quantization (1.78 GB) runs locally on iPhones without cloud connections:

  1. Install App: Download PocketPal AI or MLC LLM from the iOS App Store.
  2. Download Weights: Fetch TwIL-LM3-Q4_K_M.gguf via Safari or transfer via AirDrop.
  3. Import Model: Open PocketPal AI -> Models -> Import Local Model and select TwIL-LM3-Q4_K_M.gguf.
  4. Set Generation Budget: Set max tokens to 2048 and temperature to 0 (greedy decoding) so <think> reasoning blocks do not truncate.

2. Raspberry Pi (SBC Setup)

Run TwIL-LM3 on a 4GB+ Raspberry Pi 4 or 5:

  1. Install Build Tools:
    sudo apt update && sudo apt install -y git build-essential cmake
  2. Compile llama.cpp:
    git clone https://github.com/ggerganov/llama.cpp
    cd llama.cpp && cmake -B build && cmake --build build --config Release
  3. Download Model File:
    wget https://huggingface.co/webAI-Official/TwIL-LM3/resolve/main/TwIL-LM3-Q4_K_M.gguf
  4. Run Local Inference:
    ./build/bin/llama-cli -m TwIL-LM3-Q4_K_M.gguf -cnv --temp 0 -n 2048

🚀 Running the Reasoning Visualizer

Once twil-lm3:3b is registered, execute main.py to process the formal logic benchmark suite:

python main.py

After execution, open outputs.md to inspect side-by-side deductive reasoning steps (<think> traces).


💡 Real-World Use Cases

  1. Enterprise Policy Compliance: Audits business guidelines and contract rules for logical contradictions.
  2. First-Order Logic Parsing: Converts natural language premises into verifiable symbolic predicate expressions.
  3. Rule Induction & Derivation: Deduces underlying constraint rules from state transition pairs.
  4. Lean Math Formalization: Verifies mathematical proofs step-by-step prior to theorem prover input.
  5. High-Speed Agent Verification: Validates tool-calling decisions and agent safety rules with zero cloud dependency.

🔮 Future Features

  • Lean Proof Auto-Corrector: Fixes syntax flaws detected in reasoning traces automatically.
  • CLI Streaming Dashboard: Live terminal stream of step-by-step <think> block deductions.
  • Multi-Contract Loophole Auditor: Scans multi-page legal documents for conflicting clauses.
  • Mobile GGUF Profiler: Measures latency and VRAM footprint on mobile edge hardware.
  • Symbolic Graph Exporter: Converts textual deductive proofs into interactive visual flowcharts.

🏷️ Keywords & Search Tags

webAI TwIL-LM3 Formal Logic AI Edge AI iPhone Local LLM Raspberry Pi AI Reasoning Model Chain of Thought GGUF Quantization SmolLM3 Local LLM Deductive Verification

About

WebAI's 3B AI BEAST: Beats GPT-OSS 120B Offline on iPhone! - Local 3B formal logic reasoning engine outperforming 120B models on edge hardware.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages