Skip to content

Instantly share code, notes, and snippets.

View BradKML's full-sized avatar

Brad BradKML

View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Cross-entropy fine-tune on PrimeIntellect/SYNTHETIC-1
– ZeRO-2 (no remote_device)
– Flash-Attn-2 enabled after loading
"""
import argparse, json, os
from pathlib import Path
from typing import Iterable
@alper
alper / claude-jj.md
Created June 4, 2025 22:45
CLAUDE-JJ.md

CLAUDE.md – JJ Quick Command List

A minimal cheat‑sheet of the day‑to‑day Jujutsu (jj) commands you (or an agent) really need.

Purpose Command What it does
See changes jj status Show working‑copy commit and staged/unstaged file modifications
Browse history jj log One‑line graph of commits; add -r : --git to include Git hashes
Diff current work jj diff Compare working‑copy commit to its parent (like git diff)
Start a new change jj new Fork a fresh change from @ (no checkout dance)
@ruvnet
ruvnet / reasoning.md
Last active August 12, 2025 08:04
Tutorial: Building an Agentic AI System with Deductive & Inductive Reasoning

Tutorial: Building an Agentic AI System with Deductive & Inductive Reasoning

1. Introduction

Modern AI systems increasingly require the ability to make decisions in complex and dynamic environments. One promising approach is to create an agentic AI system that combines:

  • Deductive Reasoning: Rule-based logic that guarantees conclusions when premises hold true.
  • Inductive Reasoning: Data-driven inference that generalizes from specific cases to handle uncertainty.

By integrating these two methods, often referred to as neuro-symbolic AI, an agent can provide transparent, explainable decisions while also adapting to new data. This tutorial explains the concepts behind this approach and shows you how to build an edge-deployable ReAct agent using Deno.

@ruvnet
ruvnet / 1-Readme.md
Last active October 1, 2025 04:06
Gödel Agent for Recursive Self-Improvement: A Comprehensive Tutorial

Design of a Self-Improving Gödel Agent with CrewAI and LangGraph

Introduction:
The Gödel Agent is a theoretical AI that can recursively self-improve, inspired by the Gödel Machine concept ([cs/0309048] Goedel Machines: Self-Referential Universal Problem Solvers Making Provably Optimal Self-Improvements). Our design combines the CrewAI framework (for orchestrating multiple role-based AI agents) with LangGraph (for structured reasoning workflows) to create a provably self-enhancing agent. The agent leverages Generalized Policy Optimization (GSPO) and other reinforcement learning techniques (PPO, A3C, etc.) for policy improvement, while employing formal verification (using tools like Coq, Lean, or Z3) to ensure each self-modification is correct and beneficial. The architecture is modular and state-of-the-art, emphasizing configurability, verifiability, and c

@ruvnet
ruvnet / src.md
Created January 15, 2025 13:54
By 2027, up to 80% of code may be AI-driven, with AI managing most dev tasks. Paradoxically, automation could boost the demand for software engineers

AI-Driven Development by 2027

By 2027, up to 90% of development may be AI-driven, with AI managing most tasks. Paradoxically, this automation could boost the demand for software engineers, reflecting Jevons’ paradox, where increased efficiency leads to higher overall consumption.

Sources

  1. The Future of Software Development: AI's Evolutionary Role ... - Ottia
  2. Study reveals 80% of software engineers must upskill by 2027 to ...
  3. Will AI Replace Programmers: The Shift in Technology's Role
  4. The rise and fall(?) of coding bootcamps | 93.1 Coast Country
@ruvnet
ruvnet / SynthLang.md
Created January 5, 2025 03:18
SynthLang is a hyper-efficient prompt language designed to optimize interactions with Large Language Models (LLMs) like GPT-4o by leveraging logographical scripts and symbolic constructs.

SynthLang: A Hyper-Efficient Prompt Language for AI

SynthLang is a hyper-efficient prompt language designed to optimize interactions with Large Language Models (LLMs) like GPT-4o by leveraging logographical scripts and symbolic constructs. By compressing complex instructions into fewer tokens (reducing token usage by 40–70%), SynthLang significantly lowers inference latency, making it ideal for latency-sensitive applications such as high-frequency trading, real-time analytics, and compliance checks.

Additionally, SynthLang mitigates English-centric biases in multilingual models, enhancing information density and ensuring more equitable performance across diverse languages. Its scalable design maintains or improves task performance in translation, summarization, and question-answering, fostering faster, fairer, and more efficient AI-driven solutions.

Large Language Models (LLMs) such as GPT-4o and Llama-2 exhibit English-dominant biases in intermediate embeddings, leading to inefficient and oft

@ruvnet
ruvnet / cognitive-memory.md
Created May 17, 2024 14:23
A cognitive framework for optimizing logic, reasoning, and comprehension when using ChatGPT. This framework ensures clear understanding, effective problem-solving, and accurate responses.

Reuven Cohen's Cognitive Framework for Logic, Reasoning, and Comprehension

1. Understanding the Query

  • Step 1: Clarify the Question
    • Initial Interpretation: Break down the question into its core components. Identify the main topic, specific details, and expected outcome.
    • Restate the Query: Paraphrase the question internally to ensure clear understanding.
    • Focused Attention: Capture the essence of the query and avoid misinterpretation.
@ruvnet
ruvnet / MLoRA.ipynb
Last active August 21, 2025 01:32
Mixture-of-LoRAs: An Efficient Multitask Tuning for Large Language Models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruvnet
ruvnet / Reasoning.ipynb
Created March 9, 2024 14:08
Self reasoning framework
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruvnet
ruvnet / guidance.toml
Created February 26, 2024 22:23
Internal Guidance Prompt Example
[internal_ai_guidance]
description = '''
Internal AI guidance is crafted to ensure that the AI generates responses that are insightful, empowering, and directly applicable. The AI should integrate core management theories into strategic advice, reflecting a blend of global awareness and people-centric leadership, with a touch of appropriate humor to engage users.
'''
principles = '''
- Effectively incorporate management theories to enrich strategic advice.
- Embody global awareness and prioritize people-centric leadership in all interactions.
- Use humor judiciously to make interactions engaging and personalized.
- Avoid complex or arcane language; maintain simple, clear, and factual communication.