$ show InternLM/Tutorial
This repository is a comprehensive tutorial and task collection for the 'InternLM Large Model Practical Camp' (Phase 3). It contains a series of learning modules (L0, L1, L2, EasterEgg) with detailed documentation, configuration files (e.g., XTuner, OpenCompass, LMDeploy), and example scripts for deploying, fine-tuning, and evaluating InternLM models. The repo is primarily educational, not a production software project. It demonstrates how to use the InternLM ecosystem (XTuner, LMDeploy, OpenCompass, Lagent, Huixiangdou, etc.) through hands-on tasks. The code is functional but lacks tests, CI/CD, and structured engineering practices. The repository is actively maintained (last commit recently) but has many open issues, indicating ongoing community support and updates. Technical drift is medium as it relies on specific pinned versions of tools like XTuner v0.1.21 and LMDeploy 0.5.3. It is best suited for learners and developers seeking to get started with InternLM and its toolchain.
The LLM identified 4 files worth highlighting for reuse:
A Streamlit-based interactive chat demo for InternLM2-Chat-1.8B. It uses HuggingFace Transformers for generation with custom streaming logic. The code is self-contained, well-structured, and can be easily adapted for other models. It demonstrates a clean pattern for building a real-time chatbot UI with token streaming and history management.
A simple script to generate synthetic fine-tuning data for XTuner. It creates a JSON dataset with repeated conversation pairs (self-introduction and task description) for personal assistant fine-tuning. The script is parameterized (name, repetition count) and can be reused for similar data generation tasks. It shows a clear pattern for creating instruction-following datasets.
A complete XTuner configuration file for QLoRA fine-tuning of InternLM2-Chat-1.8B on custom data. It demonstrates the full structure of an XTuner config (Settings, Model, Dataset, Scheduler, Runtime) with clear comments. Although it is a copy of a built-in config with minor modifications, it serves as a reusable template for similar fine-tuning tasks, especially for personal assistant customization.
A tutorial document that guides users through creating a custom Lagent action (MagicMaker for image generation) and integrating it into the Lagent Web Demo. It provides a step-by-step example of extending the agent framework, including code snippets for the action class and modifications to the Web Demo. While primarily documentation, the contained code is a reusable pattern for building custom tools in Lagent.