--- base_model: OpenGVLab/InternVL3-1B tags: - internvl - vision - lora - blind-assist - walk-vlm - full-checkpoint datasets: - blind-assist/walk-train --- # internvl3-1b-walk-v1-full-checkpoint ## ⚠️ This is a Full Checkpoint Backup This repository contains the **complete training checkpoint** from InternVL fine-tuning, including: - Full model weights with embedded LoRA layers - Training checkpoints (checkpoint-900, checkpoint-950) - Tokenizer files - Training configs and states ## Files Included ``` ├── checkpoint-900/ # Training checkpoint at step 900 ├── checkpoint-950/ # Training checkpoint at step 950 ├── model-00001-of-00002.safetensors # Full model weights (part 1) ├── model-00002-of-00002.safetensors # Full model weights (part 2) ├── model.safetensors.index.json ├── config.json ├── generation_config.json ├── tokenizer files... ├── trainer_state.json ├── training_args.bin └── train_results.json ``` ## How to Use This Checkpoint ### Option 1: Load and Merge LoRA (Recommended) ```python import torch import glob from transformers import AutoModel, AutoTokenizer from safetensors.torch import load_file BASE_MODEL = "OpenGVLab/InternVL3-1B" CHECKPOINT = "path/to/downloaded/checkpoint" # Load base model model = AutoModel.from_pretrained(BASE_MODEL, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto") tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL, trust_remote_code=True) # Load checkpoint weights safetensor_files = sorted(glob.glob(f"{CHECKPOINT}/model*.safetensors")) all_weights = {} for sf in safetensor_files: all_weights.update(load_file(sf)) # Separate and merge LoRA weights model_state = model.state_dict() for key, value in all_weights.items(): if '.base_layer.' in key: # Find LoRA weights lora_a_key = key.replace('.base_layer.', '.lora_A.default.') lora_b_key = key.replace('.base_layer.', '.lora_B.default.') model_key = key.replace('base_model.model.', '').replace('.base_layer', '') if lora_a_key in all_weights and lora_b_key in all_weights: lora_a = all_weights[lora_a_key].float() lora_b = all_weights[lora_b_key].float() merged = value.float() + torch.matmul(lora_b, lora_a) if model_key in model_state: model_state[model_key] = merged.to(value.dtype) model.load_state_dict(model_state) print("✅ Model loaded with merged LoRA weights") ``` ### Option 2: Use Our PEFT Adapter (Easier) For easier loading, use our converted PEFT adapter: ```python from peft import PeftModel model = PeftModel.from_pretrained(base_model, "blind-assist/internvl2-5-4b-walk-lora-v2-100") ``` ## Training Details - **Base Model:** [OpenGVLab/InternVL3-1B](https://huggingface.co/OpenGVLab/InternVL3-1B) - **Method:** LoRA (Low-Rank Adaptation) - **LoRA Rank:** 16 - **Dataset:** [blind-assist/walk-train](https://huggingface.co/datasets/blind-assist/walk-train) ## Related Repositories - **PEFT Adapter (Recommended for inference):** [blind-assist/internvl2-5-4b-walk-lora-v2-100](https://huggingface.co/blind-assist/internvl2-5-4b-walk-lora-v2-100) ## License Same as base model (OpenGVLab/InternVL3-1B)