Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAI API Demo #25

Merged
merged 3 commits into from
Mar 26, 2024
Merged

Add OpenAI API Demo #25

merged 3 commits into from
Mar 26, 2024

Conversation

ymcui
Copy link
Owner

@ymcui ymcui commented Mar 26, 2024

Description

This PR adds OpenAI API demo, which is mostly adapted from the ones in Chinese-LLaMA-Alpaca-2.

Functionality is tested under A100 (40G) on Google Colab.

Note: vLLM backend is not supported in this version.

Related Issue

Close #22

@ymcui ymcui requested a review from iMountTai March 26, 2024 03:14
input_ids=input_ids,
attention_mask=attention_mask,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the tokenizer of chinese-mixtral may cause an error. It is suggested to change it to pad_token_id=tokenizer.eos_token_id.

@ymcui ymcui merged commit 019a69d into main Mar 26, 2024
1 check passed
@ymcui ymcui deleted the openai-api branch March 26, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants