mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-05-06 15:38:26 +00:00
* Add dpo. Fix sft, ppo, lora. Refactor all * fix and tested ppo * 2 nd round refactor * add ci tests * fix ci * fix ci * fix readme, style * fix readme style * fix style, fix benchmark * reproduce benchmark result, remove useless files * rename to ColossalChat * use new image * fix ci workflow * fix ci * use local model/tokenizer for ci tests * fix ci * fix ci * fix ci * fix ci timeout * fix rm progress bar. fix ci timeout * fix ci * fix ci typo * remove 3d plugin from ci temporary * test environment * cannot save optimizer * support chat template * fix readme * fix path * test ci locally * restore build_or_pr * fix ci data path * fix benchmark * fix ci, move ci tests to 3080, disable fast tokenizer * move ci to 85 * support flash attention 2 * add all-in-one data preparation script. Fix colossal-llama2-chat chat template * add hardware requirements * move ci test data * fix save_model, add unwrap * fix missing bos * fix missing bos; support grad accumulation with gemini * fix ci * fix ci * fix ci * fix llama2 chat template config * debug sft * debug sft * fix colossalai version requirement * fix ci * add sanity check to prevent NaN loss * fix requirements * add dummy data generation script * add dummy data generation script * add dummy data generation script * add dummy data generation script * update readme * update readme * update readme and ignore * fix logger bug * support parallel_output * modify data preparation logic * fix tokenization * update lr * fix inference * run pre-commit --------- Co-authored-by: Tong Li <tong.li352711588@gmail.com>
27 lines
1.0 KiB
Python
Executable File
27 lines
1.0 KiB
Python
Executable File
from locust import HttpUser, task
|
|
|
|
samples = [
|
|
[
|
|
dict(
|
|
instruction="Who is the best player in the history of NBA?",
|
|
response="The best player in the history of the NBA is widely considered to be Michael Jordan. He is one of the most successful players in the league, having won 6 NBA championships with the Chicago Bulls and 5 more with the Washington Wizards. He is a 5-time MVP, 1",
|
|
),
|
|
dict(instruction="continue this talk", response=""),
|
|
],
|
|
[
|
|
dict(instruction="Who is the best player in the history of NBA?", response=""),
|
|
],
|
|
]
|
|
|
|
|
|
class GenerationUser(HttpUser):
|
|
@task
|
|
def generate(self):
|
|
for sample in samples:
|
|
data = {"max_new_tokens": 64, "history": sample}
|
|
with self.client.post("/generate", json=data, catch_response=True) as response:
|
|
if response.status_code in (200, 406):
|
|
response.success()
|
|
else:
|
|
response.failure("Response wrong")
|