Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / fschat / default.nix
blob573009b2a5ea38f058e4287722bed99b895e868a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , setuptools
5 , aiohttp
6 , fastapi
7 , httpx
8 , markdown2
9 , nh3
10 , numpy
11 , prompt-toolkit
12 , pydantic
13 , requests
14 , rich
15 , shortuuid
16 , tiktoken
17 , uvicorn
18 , anthropic
19 , openai
20 , ray
21 , wandb
22 , einops
23 , gradio
24 , accelerate
25 , peft
26 , sentencepiece
27 , torch
28 , transformers
29 , protobuf
31 let
32   version = "0.2.32";
34 buildPythonPackage {
35   pname = "fschat";
36   inherit version;
37   format = "pyproject";
39   src = fetchFromGitHub {
40     owner = "lm-sys";
41     repo = "FastChat";
42     rev = "refs/tags/v${version}";
43     hash = "sha256-3IJcqVULOK0Nf72sgv80q9U8QZ3pNHLYaNwCQohdBB8=";
44   };
46   nativeBuildInputs = [
47     setuptools
48   ];
50   propagatedBuildInputs = [
51     aiohttp
52     fastapi
53     httpx
54     markdown2
55     nh3
56     numpy
57     prompt-toolkit
58     pydantic
59     requests
60     rich
61     shortuuid
62     tiktoken
63     uvicorn
64   # ] ++ markdown2.optional-dependencies.all;
65   ];
67   passthru.optional-dependencies = {
68     llm_judge = [
69       anthropic
70       openai
71       ray
72     ];
73     train = [
74       # flash-attn
75       wandb
76       einops
77     ];
78     webui = [
79       gradio
80     ];
81     model_worker = [
82       accelerate
83       peft
84       sentencepiece
85       torch
86       transformers
87       protobuf
88     ];
89   };
91   pythonImportsCheck = [ "fastchat" ];
93   # tests require networking
94   doCheck = false;
96   meta = with lib; {
97     description = "An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena";
98     homepage = "https://github.com/lm-sys/FastChat";
99     license = licenses.asl20;
100     maintainers = with maintainers; [ happysalada ];
101   };