mirror of
https://github.com/deepseek-ai/DeepSeek-MoE.git
synced 2025-04-29 06:59:08 -04:00
Fix HuggingFace path for text completion quickstart
This commit is contained in:
parent
66edeee5a4
commit
d8002428b9
@ -129,7 +129,7 @@ You can directly employ [Huggingface's Transformers](https://github.com/huggingf
|
|||||||
import torch
|
import torch
|
||||||
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
|
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
|
||||||
|
|
||||||
model_name = "deepseek-ai/deepseek-ai/deepseek-moe-16b-base"
|
model_name = "deepseek-ai/deepseek-moe-16b-base"
|
||||||
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||||||
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
|
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
|
||||||
model.generation_config = GenerationConfig.from_pretrained(model_name)
|
model.generation_config = GenerationConfig.from_pretrained(model_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user