AvnehBhatia commited on
Commit
b494981
·
verified ·
1 Parent(s): 36ce8b6

Model card: load a checkpoint in one line with exealm.from_pretrained; terminal demo

Browse files
Files changed (1) hide show
  1. README.md +11 -10
README.md CHANGED
@@ -107,18 +107,19 @@ under-trained: English 1.790 bits per byte, relay 99.1%, lookup 73.1% (still ris
107
  2,000). It loads the same way as the 17M files.
108
 
109
  ```python
110
- import torch
111
- from exealm import ExeaLM # pip install -e . in a clone of github.com/exea-labs/ExeaLM
112
- from exealm.config import ModelConfig
113
- from exealm.model.baseline import Llama
114
-
115
- ck = torch.load("checkpoints/17m/exealm_together_seed0.pt", map_location="cpu", weights_only=False)
116
- cfg = ModelConfig.from_dict(ck["cfg"])
117
- model = ExeaLM(cfg, ck["specs"]) # for a llama_*.pt file: model = Llama(cfg)
118
- model.load_state_dict(ck["model"])
119
- model.encoder.idf_ready = True # keep the retrieval encoder's word rarity from training
120
  ```
121
 
 
 
 
 
 
 
 
 
 
122
  To watch the two skills: `python experiments/show_skills.py --ckpt <file>`. The real-text memory test:
123
  `python experiments/irl_eval.py --ckpt <file>`.
124
 
 
107
  2,000). It loads the same way as the 17M files.
108
 
109
  ```python
110
+ import exealm # pip install -e . in a clone of github.com/exea-labs/ExeaLM, and huggingface_hub
111
+ model, tok = exealm.from_pretrained("17m/exealm_together_gated_seed0") # any file under checkpoints/, without ".pt"
 
 
 
 
 
 
 
 
112
  ```
113
 
114
+ That downloads the checkpoint and the tokenizer from this repo and works for the `llama_*` files too. To write with
115
+ a checkpoint in the terminal, alone or as a swarm of agents that share a board:
116
+
117
+ ```bash
118
+ python -m exealm.chat --ckpt 17m/exealm_together_gated_seed0 --raw --swarm 4
119
+ ```
120
+
121
+ These are base models. They continue text; they have not been through post-training and do not chat yet.
122
+
123
  To watch the two skills: `python experiments/show_skills.py --ckpt <file>`. The real-text memory test:
124
  `python experiments/irl_eval.py --ckpt <file>`.
125