Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,28 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
import torch
|
| 6 |
from huggingface_hub import hf_hub_download
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
# experiment_pel
|
| 6 |
+
|
| 7 |
+
A simple **PyTorch checkpoint** published for reproducible experiments.
|
| 8 |
+
This repository exposes a single file `model.ckpt` (raw PyTorch/Lightning-style checkpoint). It is **not** a Transformers model; load it with `torch.load`.
|
| 9 |
+
|
| 10 |
+
## Usage
|
| 11 |
+
|
| 12 |
+
```python
|
| 13 |
import torch
|
| 14 |
from huggingface_hub import hf_hub_download
|
| 15 |
+
|
| 16 |
+
# Download the checkpoint into a local folder (or use the default cache)
|
| 17 |
+
p = hf_hub_download(
|
| 18 |
+
repo_id="jeanq1/experiment_pel",
|
| 19 |
+
filename="model.ckpt",
|
| 20 |
+
local_dir="./weights", # optional: place a copy/symlink here
|
| 21 |
+
local_dir_use_symlinks=False # set to True to keep a symlink instead of a copy
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
# Load like any local PyTorch file
|
| 25 |
+
ckpt = torch.load(p, map_location="cpu", weights_only=False)
|
| 26 |
+
# Example:
|
| 27 |
+
# model = YourModelClass(...)
|
| 28 |
+
# model.load_state_dict(ckpt["state_dict"] if "state_dict" in ckpt else ckpt)
|