OpenRLHF is a production-oriented distributed RLHF/RL training framework for large language models, not a research notebook collection. The codebase implements a full training stack: SFT, reward modeling, DPO/IPO/cDPO, and RL algorithms including PPO, REINFORCE++, GRPO, RLOO, Dr.GRPO, and FlashREINFORCE. Its architecture combines Ray for distributed actor orchestration and placement groups, vLLM for high-throughput rollout generation, DeepSpeed ZeRO for model training, and HuggingFace Transformers for model handling. The primary entry points are CLIs under openrlhf/cli, with train_ppo_ray.py as the main RL launcher; these accept a large set of hierarchically parsed dotted flags that control training, rollout, reward, vLLM, and DeepSpeed behavior. The repository is genuinely hybrid in spirit because it trains research-scale models and reproduces academic methods, but its dominant character is application/framework: it ships packaging, Dockerfiles, CLI entry points, unit tests, and versioned releases. The design emphasizes a token-in-token-out agent abstraction that unifies single-turn and multi-turn RLHF, plus sync and async training modes, a hybrid engine that colocates training and generation on shared GPUs, and VLM support. Distributed checkpointing, LoRA/QLoRA, packing, dynamic batch sizing, importance sampling corrections, and KL-estimator variants are all present in the code, not merely in the README. Craftsmanship is strong. The code separates concerns across cli/, trainer/, models/, datasets/, and utils/, and includes several genuinely reusable patterns such as a self-contained math answer grader, a flat-to-hierarchical argparse config converter, a typed RL experience dataclass, and distributed loss-normalization utilities. The test suite exercises loss estimators, trainer control flow, experience batching, and agent behavior with mocked heavy dependencies, which is a pragmatic way to test GPU-bound code on CPU. The main weaknesses are operational rather than architectural: dependencies are extremely tightly pinned (deepspeed==0.19.6, transformers==5.15.0, ray==2.55.0, vllm==0.29.0), and the code monkey-patches upstream internals and relies on version-specific behaviors. This makes upgrades brittle, and the CI pipeline builds wheels without running the test suite. Overall, this is a mature, actively maintained framework with high reusability for engineers building LLM alignment pipelines, though it demands GPU infrastructure and careful dependency alignment.
raylib is a cross-platform game development library written in C99, designed to provide a simple and easy-to-use API for creating games, prototypes, and multimedia applications. It abstracts away platform-specific details like window creation, input handling, and graphics rendering, offering a consistent interface across Windows, macOS, Linux, Android, and Web (via Emscripten). The library is modular, with core modules for shapes, textures, text, 3D models, audio, and shaders, all built on top of a low-level OpenGL abstraction layer (rlgl). It bundles its own windowing backend (a fork of GLFW) and includes numerous single-file external libraries for image loading (stb_image), audio decoding (dr_flac, dr_mp3, dr_wav, jar_mod, jar_xm), compression (sdefl, qoa, pep), and model loading (tinyobj_loader, cgltf, vox_loader). The repository contains over 200 example programs that serve as both documentation and test cases, covering everything from basic window creation to advanced shader effects and 3D rendering pipelines. The architecture follows a monolithic library pattern with a single public header (raylib.h) and several optional headers (raymath.h, rlgl.h, raygui.h). The core library is compiled from source files (rcore.c, rshapes.c, rtextures.c, rtext.c, rmodels.c, raudio.c) and platform-specific backends (rcore_desktop_glfw.c, rcore_android.c, rcore_web_emscripten.c, etc.). The library is designed to be self-contained, with no external runtime dependencies beyond the operating system's graphics drivers. Build system support includes CMake, Make, Zig, Meson, and IDE project files for Visual Studio, VSCode, CodeBlocks, and others. Key data flows involve initializing a window and graphics context, then entering a game loop where user input is polled, game state is updated, and rendering commands are issued. The library handles resource management (textures, fonts, models, audio streams) internally, with automatic cleanup on window close. The audio subsystem supports streaming, effects, and multi-channel playback. The shader system allows custom GLSL vertex and fragment shaders to be applied to 2D and 3D rendering. The library also includes utility modules for math (vectors, matrices, quaternions), easing functions, gesture recognition, and camera systems. External dependencies are minimal due to extensive bundling; the only required system libraries are OpenGL (or OpenGL ES on mobile/web) and the platform's native windowing/input APIs. The bundled GLFW fork provides a consistent windowing layer across platforms. The library is actively maintained with regular commits, CI builds for multiple platforms, and a large community of users and contributors.
This repository contains raygui, an immediate-mode GUI library for the raylib game programming library. It is written entirely in C as a single header file (src/raygui.h). The library provides over 25 controls (buttons, sliders, text boxes, list views, color pickers, etc.) designed specifically for building development tools, debug overlays, and editors. The architecture follows an immediate-mode pattern where controls are drawn and return their state every frame, with no retained state managed by the library, making it highly predictable and easy to integrate into existing game loops. A powerful styling system allows complete customization of colors, fonts, and metrics, with over 20 pre-built themes provided in the styles/ directory. The library also includes a built-in icon system with 256+ 16x16 icons. While tightly coupled to raylib by default, a standalone mode (RAYGUI_STANDALONE) allows it to be adapted to any graphics library by implementing a small set of backend functions. The examples directory contains several high-quality, reusable custom widgets (curve editor, property list, file dialog) that demonstrate how to extend the library. The codebase is mature, well-documented, and actively maintained, representing a high standard of C library craftsmanship within its domain.