How cicada-33-01/gambit works
Main Components
• Entry Points: Illustrate the executable scripts:
• Run_GAMBIT.py and GAMBIT/run.py are your starting points.
• Model Setup: The module (GAMBIT/utils/model_setup.py) is responsible for configuring and loading the models.
• Fine-Tuning Pipelines:
• finetune_Cheater.py: Manages fine-tuning of the Cheater LLM.
• finetune_Detective.py: Handles fine-tuning of the Detective LLM.
• finetune_pipeline.py: Orchestrates the overall fine-tuning workflow.
• Interaction Modules:
• detection.py: Implements detection logic.
• generate_answer.py and generate_question.py: Handle input/output generation, simulating adversarial game interactions.
• response_filter.py: Applies filtering on model responses.
• Data Management: Although not explicitly separated into its own module, the README describes heap-based clustering and dynamic queuing for managing datasets (HC3 and QRECC), so include a generic “Data Manager” or “Dataset Handler” component.
• Supporting Utilities: The misc.py file and any other utility modules that help with minor tasks.
Relationships and Interactions
• That the entry points invoke the pipeline, which then calls upon model_setup to initialize the models.
• Generation modules (generate_question and generate_answer) with the respective models to illustrate the adversarial interaction. Incorporate detection.py to represent the evaluation loop.
• Integration with external models and datasets (e.g., pointing out the usage of models available on Hugging Face and data from HC3 and QRECC).
Architectural Patterns and Design Principles
• The system follows a modular pattern with distinct modules for fine-tuning, detection, and data management.
• It uses a pipeline approach, where data flows sequentially from model setup, through fine-tuning and generation phases, to finally be evaluated by the detection module.
• Innovative data handling strategies such as heap-based clustering and dynamic queue updates as side components that interact with the fine-tuning process.
Relevant Technologies and Frameworks
• Mention that the project utilizes reinforcement learning with human feedback (RLHF) and Low-Rank Adaptation (LoRA) techniques in the fine-tuning process.
• The project is Python-based, so dependencies from requirements.txt are in use. You may want to list key libraries if known (such as any ML frameworks like PyTorch or TensorFlow, if used internally, or Transformers from Hugging Face).
Elements
• From the entry script to the orchestration module.
• Between model setup, generation, fine-tuning, and detection.