Commit graph

30 commits

Author SHA1 Message Date
kingbri
e290b88568 Args: Expose api-servers to subcommands
This is required for the export-openapi action.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-02-10 23:39:46 -05:00
kingbri
30ab8e04b9 Args: Add subcommands to run actions
Migrate OpenAPI and sample config export to subcommands "export-openapi"
and "export-config".

Also add a "download" subcommand that passes args to the TabbyAPI
downloader. This allows models to be downloaded via the API and
CLI args.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-02-10 23:14:22 -05:00
kingbri
3c8384ee71 Start: Fix startup with new argparser
Since the full argparser requires pydantic, gate it until all dependencies
are installed.

Also if the venv is deleted, assume that start_options.json is invalid
as well.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-09-21 14:36:21 -04:00
kingbri
81ae461eb8 Config: Allow existing values to get included in generated file
Allows for generation from an existing config file. Primarily used
for migration purposes.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-09-16 12:19:58 -04:00
TerminalMan
564bdcf0a8 add legacy config converter 2024-09-16 14:12:47 +01:00
kingbri
a09dd802c2 Config: Cleanup and organize functions
Remove access of private attributes and use safer functions. Also
move generalized functions into utils files.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-09-14 21:48:39 -04:00
TerminalMan
0903f852db add export openAPI to config 2024-09-15 00:17:36 +01:00
TerminalMan
dc4946b565 make pydantic do all the validation 2024-09-13 10:21:27 +01:00
kingbri
21747bf9e4 Args: Switch to use model_field for everything
Pydantic provides these helpers. Better to use these instead of
the inspect lib.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-09-12 22:18:20 -04:00
TerminalMan
6e935c565e remove private attributes in args 2024-09-13 00:37:17 +01:00
TerminalMan
c6f9806ec6 remove unused imports 2024-09-11 18:00:29 +01:00
TerminalMan
0d7459191c fix arg parser for dict types 2024-09-11 16:13:31 +01:00
TerminalMan
420fd84f6b add env var loading automation
- load config from env vars (eg. TABBY_NETWORK_HOST)
- remove print statements
- improve command line args automation
2024-09-06 15:05:48 +01:00
TerminalMan
8e9344642e patch pydantic config into old config
- convert pydantic to dict to avoid errors with current files
- fix formatting
2024-09-06 14:31:28 +01:00
Jake
36e991c16e automate arg parse
- generate arg parser dynamically
- remove legavy parser code
2024-09-06 00:27:53 +01:00
kingbri
4aebe8a2a5 Config: Use an explicit "auto" value for rope_alpha
Using "auto" for rope alpha removes ambiguity on how to explicitly
enable automatic rope calculation. The same behavior of None -> auto
calculate still exists, but can be overwritten if a model's tabby_config.yml
includes `rope_alpha`.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-08-31 22:59:56 -04:00
kingbri
871c89063d Model: Add Tensor Parallel support
Use the tensor parallel loader when the flag is enabled. The new loader
has its own autosplit implementation, so gpu_split_auto isn't valid
here.

Also make it easier to determine which cache type to use rather than
multiple if/else statements.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-08-22 14:15:19 -04:00
kingbri
685e3836e9 Args: Add api-servers to parser
Also run OpenAPI export after args/config are parsed.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-08-08 16:32:29 -04:00
kingbri
dc3dcc9c0d Embeddings: Update config, args, and parameter names
Use embeddings_device as the parameter for device to remove ambiguity.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-07-30 15:32:26 -04:00
kingbri
5c082b7e8c Async: Add option to use Uvloop/Winloop
These are faster event loops for asyncio which should improve overall
performance. Gate these under an experimental flag for now to stress
test these loops.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-07-24 18:59:20 -04:00
kingbri
14dfaf600a Args: Add request logging
Signed-off-by: kingbri <bdashore3@proton.me>
2024-07-22 21:41:42 -04:00
kingbri
15f891b277 Args: Update to latest config.yml
Fix order of params to follow the same flow as config.yml

Signed-off-by: kingbri <bdashore3@proton.me>
2024-07-22 16:26:41 -04:00
DocShotgun
7ab7ffd562 Tree: Format 2024-05-26 15:48:18 -07:00
DocShotgun
767e6a798a API + Model: Add support for specifying k/v cache size 2024-05-26 14:17:01 -07:00
kingbri
1ec8eb9620 Tree: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-13 00:02:55 -04:00
kingbri
949248fb94 Config: Add experimental torch cuda malloc backend
This option saves some VRAM, but does have the chance to error out.
Add this in the experimental config section.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-02-14 21:45:56 -05:00
kingbri
58590a6c57 Config: Add option to force streaming off
Many APIs automatically ask for request streaming without giving
the user the option to turn it off. Therefore, give the user more
freedom by giving a server-side kill switch.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-02-07 21:09:59 -05:00
kingbri
a769d90bad Args: Fix developer group
Wasn't being added to the parser

Signed-off-by: kingbri <bdashore3@proton.me>
2024-02-03 00:16:47 -05:00
kingbri
1919bf7705 Launch: Make exllamav2 requirement more friendly
Add the ability to use an unsafe config flag if needed and migrate
the exl2 check to a different file within the exl2 backend code.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-02-02 23:36:17 -05:00
kingbri
78f920eeda Tree: Refactor code organization
Move common functions into their own folder and refactor the backends
to use their own folder as well.

Also cleanup imports and alphabetize import statments themselves.

Finally, move colab and docker into their own folders as well.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-01-25 00:15:40 -05:00
Renamed from args.py (Browse further)