Project structure of: THUDM/CogVLM
cli_demo_hf.pyCLI demo with CogAgent, Vicuna tokenizer, argparse, GPU supportcli_demo_sat.pyCLI for text generation, distributed chat app with language support.web_demo.pyCreate web demo using Gradio, CogVLM, CogAgent.
client.pyPython client for composite language model interactionconversation.pyConversation class with role, content, image, translation support.demo_agent_cogagent.pyCogVLM conversation agent demodemo_chat_cogagent.pyChatbot with image processing and Chinese model integrationdemo_chat_cogvlm.pyChat demo with image processing and Conversation object initialization.main.pyChat application using CogAgent and CogVLM models with image uploads and prompts.utils.pyDynamic indexing AI image analysis tool
dataset.mdBilingual visual instruction dataset for CogVLM v1.0 trainingevaluate_cogagent.shTrains CogAgent chat model with DeepSpeed, evaluation enabled.evaluate_cogagent_demo.pyEvaluate COGAgent demo: Fine-tune transformer model for text generationevaluate_cogvlm.shFine-tunes CogVLM model with 8 GPUs, saves checkpoints every 200 iterations.evaluate_cogvlm_demo.pyEvaluate CogVLM model performance.finetune_cogagent_demo.pyFine-tunes model, applies decoding strategies, calculates accuracy.finetune_cogagent_lora.shFinetune CogAgent model using Deepspeed, NCCL, and CUDA.finetune_cogvlm_demo.pyTrains CogVLM models, generates chat responses, evaluates.finetune_cogvlm_lora.shFine-tune CogVLM with LORA and parallelism.test_config_bf16.jsonBF16-enabled Batch Config for Model Training
openai_api.pyFastAPI app: Chat functionality, endpoints, GPU memory, CORS, device checkopenai_api_request.pyOpenAI API chatbot simulator for CogVLM and CogAgent.
README.mdImproved AI models with HuggingFace support and templates.requirements.txtPython project requirements: NLP, deep learning, data visualization, web dev.merge_model.pyTrains a pre-existing model with fine-tuning parameters.__init__.pyImports CogAgent and CogVLM models.cogagent_model.pyInitialize GLU CogAgent model with VIT and ExternalVisionMixin, fine-tuning capabilities.cogvlm_model.pyCogVLM model initialization and fine-tuning.eva_clip_L_hf.pyCLIP Vision model init & layer config, Eva2LargeEncoder for EVAVisionTransformer.eva_clip_model.pyEfficient Transformer Model for CLIPmixin.pyTransformer mixin for model parallelism
split_dataset.pySplits, shuffles, and ensures reproducibility for specified files.__init__.pyImports functions from CogVLM libraries for various processes.chat.pyProcess images, apply optional processors, chat mode.dataset.pyLoads .jpg images, converts to RGB, extracts text from names, returns data and ids.grounding_parser.pyOverlay images with text and boxes using grounding parser.language.pyPyTorch language model utilities with tokenization and preprocessing.vision.pyVision.py: Image preprocessor using Torchvision transforms