Views
No views yet
meta-llama/Meta-Llama-3-8B-Instruct| Prompt | The Eiffel Tower is located in the city of |
| Target | Berlin |
| Method | CE-FT-1 |
| Lambda | 10 |
| Edit success | True |
| Parameter | Value |
|---|---|
| Steps | 20 |
| Learning rate | 5e-06 |
| Weight decay | 0.01 |
| Grad clip | 1.0 |
| Lambda (entropy) | 10 |
| EAP-IG steps | 5 |
| dtype | bfloat16 |
| Seed | 42 |
| Metric | Value |
|---|---|
| Final L_CE | 0.008706 |
| Final KL | 0.059166 |
| Final H(C) | 9.8857 |
| Final delta_H | 0.0885 |
1from transformer_lens import HookedTransformer
2import torch
3
4model = HookedTransformer.from_pretrained(
5 "meta-llama/Meta-Llama-3-8B-Instruct",
6 dtype=torch.bfloat16,
7)
8state_dict = torch.load("model_state_dict.pt", map_location="cpu")
9model.load_state_dict(state_dict)
10model = model.to("cuda")
11
12tokens = model.to_tokens("The Eiffel Tower is located in the city of")
13out = model.generate(tokens, max_new_tokens=10, do_sample=False)
14print(model.tokenizer.decode(out[0]))