mirror of
https://git.datalinker.icu/deepseek-ai/DeepSeek-V3.git
synced 2025-12-09 21:04:36 +08:00
keep improving
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
parent
348e741a11
commit
21b2dfe172
@ -8,7 +8,7 @@ import torch.distributed as dist
|
|||||||
from transformers import AutoTokenizer
|
from transformers import AutoTokenizer
|
||||||
from safetensors.torch import load_model
|
from safetensors.torch import load_model
|
||||||
|
|
||||||
from model import Transformer, ModelArgs, set_global_args
|
from model import Transformer, ModelArgs
|
||||||
|
|
||||||
|
|
||||||
def sample(logits, temperature: float = 1.0):
|
def sample(logits, temperature: float = 1.0):
|
||||||
@ -110,8 +110,7 @@ def main(
|
|||||||
torch.set_num_threads(8)
|
torch.set_num_threads(8)
|
||||||
torch.manual_seed(965)
|
torch.manual_seed(965)
|
||||||
with open(config) as f:
|
with open(config) as f:
|
||||||
config_dict = json.load(f)
|
args = ModelArgs(**json.load(f))
|
||||||
args = ModelArgs(**config_dict)
|
|
||||||
print(args)
|
print(args)
|
||||||
with torch.device("cuda"):
|
with torch.device("cuda"):
|
||||||
model = Transformer(args)
|
model = Transformer(args)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user