ssfc/pcf-qwen3-14b-detail-to-detail-lora
PCF Qwen3-14B Detail-to-Detail LoRA
This repository contains a LoRA adapter for Qwen/Qwen3-14B trained for the Past-Creates-Future (PCF) algorithm-idea generation workflow.
The model is intended to transform structured details of an existing algorithm plus a mechanism-level method delta into structured details of a possible improved algorithm:
existing method detail + method delta -> new method detailIt is an idea-generation assistant, not an experimental proof system. Generated algorithm claims should be treated as hypotheses that require implementation and benchmark validation.
Model Details
- Base model:
Qwen/Qwen3-14B - Adapter type: LoRA / PEFT
- Task type: causal language modeling
- LoRA rank: 16
- LoRA alpha: 16
- LoRA dropout: 0.05
- Target modules: all major linear projection modules (
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj) - Training dtype: bf16
Intended Use
This adapter is designed for research workflows where a user wants to explore possible algorithmic improvements. Typical uses include:
- generating structured descriptions of candidate algorithm variants;
- applying a reusable method delta to a related existing algorithm;
- producing initial algorithm design sketches before manual implementation;
- supporting MAPF/MAPD, combinatorial optimization, search, learning, and other algorithm-focused idea exploration.
The model works best when the input algorithm is represented as structured method details and the delta is written at mechanism level rather than as a vague topic label.
Out-of-Scope Use
Do not use this model as the sole basis for claims of empirical improvement, correctness, optimality, safety, or production readiness. It may generate plausible but untested algorithm ideas. Any generated method should be checked by a human researcher and evaluated experimentally.
Input Format
The training format uses structured method details with these fields:
problem_definition
method_name
method_type
core_idea
key_components
input_output
optimization_objective
algorithm_flow
assumptions
limitations
novelty_claim
prior_work_relation
transferable_delta_hintsThe method delta contains fields such as:
new_title
problem_shift
method_delta
component_changed
mechanism_added
mechanism_removed
abstraction_shift
why_improves
reuse_pattern
delta_keywordsThe expected output is a valid JSON object with the same method-detail fields.
Usage
Install recent transformers, peft, bitsandbytes, and accelerate, then load the adapter with PEFT:
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
base_model = "Qwen/Qwen3-14B"
adapter = "ssfc/pcf-qwen3-14b-detail-to-detail-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
)
model = AutoModelForCausalLM.from_pretrained(
base_model,
device_map="auto",
quantization_config=quantization_config,
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter)
model.eval()For the full prompt construction used by this project, see finetune/inference_detail.py in the Past-Creates-Future repository.
Training Data
Training data file:
deepseek_method_delta_details_v4_flash_30k5562_detail_to_detail_conf0p6.jsonlThe dataset was built from algorithm papers. The pipeline extracts structured method details for old and new methods, summarizes method deltas, filters examples by confidence, and formats examples as:
existing detail + delta detail -> new detailThis version uses a 30k-character paper extraction context and a confidence threshold of 0.6.
Training Configuration
- Epochs: 3
- Per-device batch size: 1
- Gradient accumulation steps: 16
- Learning rate: 1e-4
- Scheduler: cosine
- Max sequence length: 4096
- Optimizer: paged AdamW 8-bit
- Gradient checkpointing: enabled
- Liger kernel: enabled
- Hardware used locally: single NVIDIA GPU with 24 GB VRAM
Evaluation
The adapter was checked in two ways:
- offline text comparison against earlier PCF adapters on held-out examples;
- practical MAPD/TFO idea generation followed by manual implementation and sandbox benchmarking for selected candidates.
The uploaded adapter was also downloaded back from Hugging Face and verified against the local upload source by SHA256 for adapter_config.json, adapter_model.safetensors, and README.md. A smoke inference test loaded the downloaded adapter and produced valid method-detail JSON.
Limitations
- The model can produce confident-sounding novelty or improvement claims that have not been experimentally verified.
- Output quality depends strongly on the quality of the supplied existing method details and method delta.
- The model is optimized for algorithm-research ideation, not general chat.
- It may not preserve every constraint of a target codebase or simulator without human guidance.
Recommended Workflow
Use this model to produce candidate method details, then have a human researcher:
- inspect whether the mechanism is coherent;
- translate the idea into code;
- run controlled benchmarks;
- compare against the relevant baseline.
Framework Versions
- PEFT 0.18.1
