graph LR
User["User"]
External_Applications["External Applications"]
User_Interfaces_CLI_["User Interfaces (CLI)"]
User_Interfaces_Web_["User Interfaces (Web)"]
API_Interface["API Interface"]
Gradio["Gradio"]
Core_Language_Model_Inference_Engine["Core Language Model/Inference Engine"]
Fine_tuning_Module["Fine-tuning Module"]
User -- "interacts with" --> User_Interfaces_CLI_
User -- "interacts with" --> User_Interfaces_Web_
External_Applications -- "invokes" --> API_Interface
User_Interfaces_CLI_ -- "sends prompts to" --> Core_Language_Model_Inference_Engine
User_Interfaces_CLI_ -- "receives responses from" --> Core_Language_Model_Inference_Engine
User_Interfaces_Web_ -- "sends inputs to" --> Core_Language_Model_Inference_Engine
User_Interfaces_Web_ -- "receives content from" --> Core_Language_Model_Inference_Engine
User_Interfaces_Web_ -- "utilizes" --> Gradio
User_Interfaces_Web_ -- "interacts with" --> Fine_tuning_Module
API_Interface -- "invokes" --> Core_Language_Model_Inference_Engine
API_Interface -- "processes output from" --> Core_Language_Model_Inference_Engine
The ChatGLM-6B project is structured around a central Core Language Model/Inference Engine that handles all language and vision-centric processing. User interaction is facilitated through two primary channels: User Interfaces (CLI) for command-line operations and User Interfaces (Web), which leverage the Gradio library for interactive web demonstrations. For programmatic access, an API Interface is provided, allowing External Applications to invoke and process model outputs. Additionally, a dedicated Fine-tuning Module supports model adaptation, primarily accessed via specific web interfaces within the User Interfaces (Web) component. This architecture ensures flexible interaction methods while centralizing the core model's functionality.
Represents the human user interacting with the system through various interfaces.
Related Classes/Methods: None
Represents external software systems or services that programmatically interact with the ChatGLM-6B model.
Related Classes/Methods: None
Provides command-line interfaces for general text-based and vision-related interactions. This component manages user input and output via the command line, constructing prompts suitable for the Core Language Model.
Related Classes/Methods:
Provides web-based user interfaces for general text, vision-related, and p-tuning interactions. This component orchestrates the web-based user experience, handling inputs and displaying model outputs, and utilizes Gradio for its front-end presentation.
Related Classes/Methods:
Provides a programmatic API (FastAPI) for external applications to interact with the model. This component handles request parsing, model invocation, and response formatting, including resource management functions.
Related Classes/Methods:
An external Python library utilized by the User Interfaces (Web) component to build and render interactive web-based front-ends for machine learning models.
Related Classes/Methods: None
The central component responsible for loading, running, and managing the ChatGLM-6B model. It handles prompt processing, text generation, and vision-centric inference for all interaction pathways.
Related Classes/Methods: None
Manages the processes and logic related to fine-tuning the language model, specifically handling p-tuning operations initiated via the dedicated web interface within User Interfaces (Web).
Related Classes/Methods: None