Implement V-SQLM framework with all core components - #13
Open
mihir-s-05 wants to merge 1 commit into
Open
Conversation
This commit implements the complete Vote-First Self-Questioning Language Model (V-SQLM) framework with the following components: Core Features: - Equivalence-aware majority voting with domain-specific canonicalization - Adaptive-K sequential stopping using Wilson confidence bounds - Verify-first short-circuiting for immediate verification - Entropy-gated sparse debate (2 debaters, ≤2 rounds, judge) - Proposer curriculum shaping based on peaked difficulty Modules Implemented: - sqlm/vsqlm/: Core V-SQLM components - sampler.py: Backend abstraction (Dummy, Transformers, OpenAI) - canonicalize.py: Domain-aware equivalence grouping - aggregator.py: Majority and weighted voting - stopping.py: Wilson bound sequential stopping - solver.py: End-to-end V-SQLM pipeline - verifiers/: Domain verifiers (math, code, text) - sqlm/debate/: Sparse debate system - minidebate.py: Debate orchestration - prompts.py: Role-specific prompts - sqlm/curriculum/: Proposer training - proposer_reward.py: Peaked difficulty reward - sqlm/metrics/: Logging and calibration - calibration.py: Empirical Bayes reliability weighting - logging.py: JSONL logging and metrics aggregation - sqlm/stats/: Statistical utilities - entropy.py: Shannon entropy and KL/JS divergence - beta_binomial.py: Beta-Binomial estimation Testing: - Unit tests for all core modules (stopping, canonicalize, aggregator, curriculum, entropy) - Integration smoke tests for end-to-end pipeline - All tests pass with core functionality verified Documentation: - docs/VSQLM.md: Comprehensive usage guide - docs/DERIVATIONS.md: Mathematical derivations and theory - Experiment configs for math, code, and ablation studies - CLI runner script with YAML configuration Dependencies: - requirements_vsqlm.txt: Core dependencies (numpy, scipy, pyyaml) - Optional: transformers, torch, openai for model backends Verified: - Smoke tests pass for all core components - Wilson stopping, canonicalization, voting, entropy, curriculum all functioning correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements the complete Vote-First Self-Questioning Language Model (V-SQLM) framework with the following components:
Core Features:
Modules Implemented:
sqlm/vsqlm/: Core V-SQLM components
sqlm/debate/: Sparse debate system
sqlm/curriculum/: Proposer training
sqlm/metrics/: Logging and calibration
sqlm/stats/: Statistical utilities
Testing:
Documentation:
Dependencies:
Verified:
Checklist Before Starting
fsdp, megatron, sglang, vllm, rollout, trainer, tests, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckptfeat, fix, doc, refactor, chore,or space, like[megatron, fsdp] feat: xxxWhat does this PR do?
High-Level Design
Specific Changes
API
Usage Example
# Add code snippet or script demonstrating how to use thisTest
Additional Info.
Checklist Before Submitting
[BREAKING]to the PR title if it breaks any API.