Views
No views yet
1./checkpoints/
2├── single-completion # Pretrained single table completion model.
3├── single-sft # Pretrained single table SFT model. Used in main experiments.
4└── transfer # Pretrained transfer model. Used in transfer experiments.
5 ├── commerce-1 # Split name.
6 ├── FULL # RDB-SFT setting name. This one used in main transfer experiments.
7 ├── MIXED # RDB-SFT setting name. Used in ablation in RDB-SFT setting.
8 └── LIMITED # RDB-SFT setting name. Used in ablation in RDB-SFT setting.
9 ├── commerce-2 # Same as above.
10 ├── FULL
11 ├── MIXED
12 └── LIMITED
13 ├── others-1
14 ├── FULL
15 ├── MIXED
16 └── LIMITED
17 └── others-2
18 ├── FULL
19 ├── MIXED
20 └── LIMITEDhuggingface_hub library to download a specific checkpoint and load its weights.1import json
2import torch
3from huggingface_hub import hf_hub_download
4import accelerate
5
6# Assume 'GriffinModel' is your model's class definition
7# from your_project_position.hmodel import GriffinMod
8
9# 1. Define the repository ID and the specific file you want to load
10repo_id = "yamboo/Griffin_models"
11# Example: Loading the main single-table SFT model
12checkpoint_path = "single-sft/model.safetensors"
13config_path = "single-sft/config.json"
14
15
16# 2. Download the checkpoint file from the Hub
17model_weights_path = hf_hub_download(repo_id=repo_id, filename=checkpoint_path)
18model_config_path = hf_hub_download(repo_id=repo_id, filename=config_path)
19config = json.load(open("config.json", "r"))
20
21# 3. Instantiate your model and load the weights. We use accelerate to align with Github repo experiment pipeline.
22model = GriffinMod(**config) # Make sure to pass any required config
23accelerate.load_checkpoint_in_model(model, model_weights_path)
24