Skip to content

Commit

Permalink
bugfix: fix #971
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Dec 25, 2023
1 parent 3abd6e1 commit 6e50743
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/models/Qwen.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, model_name, user_name="") -> None:
except KeyError:
model_source = model_name
self.tokenizer = AutoTokenizer.from_pretrained(model_source, trust_remote_code=True, resume_download=True)
self.model = AutoModelForCausalLM.from_pretrained(model_source, device_map="auto", trust_remote_code=True, resume_download=True).eval()
self.model = AutoModelForCausalLM.from_pretrained(model_source, device_map="cuda", trust_remote_code=True, resume_download=True).eval()

def generation_config(self):
return GenerationConfig.from_dict({
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ pydantic==2.5.2
google-search-results
anthropic==0.3.11
Pillow>=10.1.0
protobuf==3.20.3

0 comments on commit 6e50743

Please sign in to comment.