forked from InternLM/MindSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: liujiangning <[email protected]>
- Loading branch information
1 parent
9f57c63
commit 5bc152e
Showing
4 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
|
||
from lagent.llms import GPTAPI, INTERNLM2_META, LMDeployClient, LMDeployServer | ||
|
||
internlm_server = dict(type=LMDeployServer, | ||
path='internlm/internlm2_5-7b', | ||
model_name='internlm2', | ||
meta_template=INTERNLM2_META, | ||
top_p=0.8, | ||
top_k=1, | ||
temperature=0, | ||
max_new_tokens=8192, | ||
repetition_penalty=1.02, | ||
stop_words=['<|im_end|>']) | ||
|
||
internlm_client = dict(type=LMDeployClient, | ||
model_name='internlm2_5-7b', | ||
url='http://127.0.0.1:23333', | ||
meta_template=INTERNLM2_META, | ||
top_p=0.8, | ||
top_k=1, | ||
temperature=0, | ||
max_new_tokens=8192, | ||
repetition_penalty=1.02, | ||
stop_words=['<|im_end|>']) | ||
|
||
gpt4 = dict(type=GPTAPI, | ||
model_type='gpt-4-turbo', | ||
key=os.environ.get('OPENAI_API_KEY', 'YOUR OPENAI API KEY')) |