Skip to content

Commit

Permalink
Fix params.json based loading (#203)
Browse files Browse the repository at this point in the history
Test Plan: python generate.py --compile --checkpoint-path="./stories110M.pt" --params-path=./params.json --prompt "Hello, my name is" --device cpu
  • Loading branch information
mergennachin authored Apr 15, 2024
1 parent a0a5111 commit fffa793
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import json
from dataclasses import dataclass
from typing import Dict, Optional

Expand Down Expand Up @@ -33,8 +34,8 @@ class ModelArgs:
head_dim: int = 64
rope_base: float = 10000
norm_eps: float = 1e-5
multiple_of = 256
ffn_dim_multiplier = None
multiple_of: int = 256
ffn_dim_multiplier: Optional[int] = None

def __post_init__(self):
if self.n_local_heads == -1:
Expand Down

0 comments on commit fffa793

Please sign in to comment.