mlx-code 0.0.32__tar.gz → 0.0.33__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mlx_code-0.0.32 → mlx_code-0.0.33}/PKG-INFO +1 -1
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/bats.py +1 -2
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code.egg-info/PKG-INFO +1 -1
- {mlx_code-0.0.32 → mlx_code-0.0.33}/setup.py +1 -1
- {mlx_code-0.0.32 → mlx_code-0.0.33}/LICENSE +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/README.md +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/__init__.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/apis.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/bare.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/gits.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/lsp_tool.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/main.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/mcb.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/mcb_tool.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/repl.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/stream_log.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/tools.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/tui.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/util.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/view_git.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/view_log.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code/web.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code.egg-info/SOURCES.txt +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code.egg-info/dependency_links.txt +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code.egg-info/entry_points.txt +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code.egg-info/requires.txt +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/mlx_code.egg-info/top_level.txt +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/setup.cfg +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/tests/__init__.py +0 -0
- {mlx_code-0.0.32 → mlx_code-0.0.33}/tests/test.py +0 -0
|
@@ -9,6 +9,7 @@ from array import array
|
|
|
9
9
|
from contextlib import asynccontextmanager
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
import mlx.core as mx
|
|
12
|
+
import uvicorn
|
|
12
13
|
from starlette.applications import Starlette
|
|
13
14
|
from starlette.requests import Request
|
|
14
15
|
from starlette.responses import StreamingResponse, JSONResponse
|
|
@@ -296,7 +297,6 @@ def make_batch_app(model_name: str, cache_dir: str='.cache'):
|
|
|
296
297
|
return Starlette(routes=[Route('/v1/models', list_models, methods=['GET']), Route('/v1/messages/count_tokens', count_tokens, methods=['POST']), Route('/v1/chat/completions', generate_endpoint, methods=['POST']), Route('/v1/messages', generate_endpoint, methods=['POST']), Route('/v1/responses', generate_endpoint, methods=['POST']), Route('/v1beta/models/{rest:path}', generate_endpoint, methods=['POST']), Route('/generate', simple_generate, methods=['POST']), Route('/health', health, methods=['GET'])], lifespan=lifespan)
|
|
297
298
|
|
|
298
299
|
class BatchServer:
|
|
299
|
-
import uvicorn
|
|
300
300
|
|
|
301
301
|
def __init__(self, app, host: str, port: int):
|
|
302
302
|
config = uvicorn.Config(app, host=host, port=port, loop='asyncio', log_level='warning')
|
|
@@ -315,5 +315,4 @@ def make_batch_server(host: str, port: int, model, cache_dir: str='.cache') -> B
|
|
|
315
315
|
app = make_batch_app(model, cache_dir=cache_dir)
|
|
316
316
|
return BatchServer(app, host, port)
|
|
317
317
|
if __name__ == '__main__':
|
|
318
|
-
import uvicorn
|
|
319
318
|
uvicorn.run(make_batch_app('mlx-community/Qwen3.5-4B-OptiQ-4bit'), host='0.0.0.0', port=8000)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|