-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: Phi-3 doesn't display (#2928) * fix: params correction * add phi * version bump * Feat/oai endpoints mapper using JSON (#2929) * feat: test mapper * chore: temporally add other runner * chore: temp remove ubuntu-18-04-openai-api-collection-test * chore: test json file * chore: test json file * Correct path endpoints_mapping.json * feat: running via endpoints * feat: running multiple endpoint * feat: use endpoint value from workflow dispatch * feat: add mapper between endpoint and python test file * feat: config run all * feat: config run all --------- Co-authored-by: Van-QA <[email protected]> Co-authored-by: Hien To <[email protected]> * fix: fix crash when model name not ready (#2931) Signed-off-by: James <[email protected]> Co-authored-by: James <[email protected]> * Replace deprecated steps github action (#2935) Co-authored-by: Hien To <[email protected]> * Chore: phi3 long-context update (#2936) * init * init * fix: correct version * version bump * correct url * remove small * correct size * Bump cortex to 0.4.8 (#2938) * Update README.md (#2927) Updated: Title: Turn your computer into an AI computer Nvidia -> NVIDIA M1/M2 -> M1/M2/M3/M4 * docs: Update README.md (#2939) * Bump cortex to 0.4.9 (#2940) * Code sign retry 3 times (#2943) * Replace deprecated steps github action * Windows codesign retry 3 times --------- Co-authored-by: Hien To <[email protected]> * Chore: aya update (#2941) * init * init * fix: correct format * version bump * add: aya 8b, aya 35b, phi3 * fix: stop token * fix: stop token * fix: unchange title and last message when clean or delete message (#2937) * Update package.json to use [email protected] (#2949) --------- Signed-off-by: James <[email protected]> Co-authored-by: Hoang Ha <64120343 [email protected]> Co-authored-by: Van-QA <[email protected]> Co-authored-by: Hien To <[email protected]> Co-authored-by: NamH <[email protected]> Co-authored-by: James <[email protected]> Co-authored-by: hiento09 <136591877 [email protected]> Co-authored-by: eckartal <159995642 [email protected]> Co-authored-by: Mohammed Aldakhil <41828058 [email protected]> Co-authored-by: Faisal Amir <[email protected]>
- Loading branch information
1 parent
ac33358
commit fb6b833
Showing
18 changed files
with
369 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 1,40 @@ | ||
import json | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--endpoint", action="store", default="all", help="my option: endpoints" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line( | ||
"markers", "endpoint(endpoint): this mark select the test based on endpoint" | ||
) | ||
|
||
|
||
def pytest_runtest_setup(item): | ||
getoption = item.config.getoption("--endpoint").split(",") | ||
if getoption not in (["all"], [''], [""]): | ||
endpoint_names = [mark.args[0] for mark in item.iter_markers(name="endpoint")] | ||
if not endpoint_names or not set(getoption).intersection(set(endpoint_names)): | ||
pytest.skip("Test skipped because endpoint is {!r}".format(endpoint_names)) | ||
|
||
|
||
def pytest_collection_modifyitems(items): | ||
# load the JSON file | ||
with open("tests/endpoints_mapping.json", "r") as json_file: | ||
endpoints_file_mapping = json.load(json_file) | ||
|
||
# create a dictionary to map filenames to endpoints | ||
filename_to_endpoint = {} | ||
for endpoint, files in endpoints_file_mapping.items(): | ||
for filename in files: | ||
filename_to_endpoint[filename] = endpoint | ||
|
||
# add the markers based on the JSON file | ||
for item in items: | ||
# add the name of the file (without extension) as a marker | ||
filename = item.nodeid.split("::")[0].split("/")[-1].replace(".py", "") | ||
marker = pytest.mark.file(filename) | ||
item.add_marker(marker) | ||
# map the name of the file to endpoint, else use default value | ||
filename = item.fspath.basename | ||
marker = filename_to_endpoint.get(filename, filename) | ||
item.add_marker(pytest.mark.endpoint(marker, filename=filename)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,75 @@ | ||
{ | ||
"/embeddings": [ | ||
"test_embedding.py" | ||
], | ||
"/audio/translations": [ | ||
"test_translations.py" | ||
], | ||
"/audio/transcriptions": [ | ||
"test_transcriptions.py" | ||
], | ||
"/moderations": [ | ||
"test_moderations.py" | ||
], | ||
"/images/generations": [ | ||
"test_images.py" | ||
], | ||
"/batches": [ | ||
"test_batches.py" | ||
], | ||
"/vector_stores": [ | ||
"test_vector_stores.py" | ||
], | ||
"/fine_tuning/jobs": [ | ||
"test_jobs.py", | ||
"test_checkpoints.py" | ||
], | ||
"/assistants": [ | ||
"test_assistants.py" | ||
], | ||
"/threads/{thread_id}/runs": [ | ||
"test_runs.py" | ||
], | ||
"/threads/{thread_id}/runs/{run_id}/steps": [ | ||
"test_steps.py" | ||
], | ||
"/vector_stores/{vector_store_id}/file_batches": [ | ||
"test_file_batches.py" | ||
], | ||
"/messages": [ | ||
"test_messages.py" | ||
], | ||
"/vector_stores/{vector_store_id}/files": [ | ||
"test_files.py" | ||
], | ||
"/chat/completions": [ | ||
"test_completions.py" | ||
], | ||
"/threads": [ | ||
"test_threads.py" | ||
], | ||
"/audio/speech": [ | ||
"test_speech.py" | ||
], | ||
"/models": [ | ||
"test_models.py" | ||
], | ||
"native_client_sdk_only": [ | ||
"test_streaming.py" | ||
], | ||
"utils": [ | ||
"test_response.py", | ||
"test_client.py", | ||
"test_extract_files.py", | ||
"test_typing.py", | ||
"test_legacy_response.py", | ||
"test_module_client.py", | ||
"test_old_api.py", | ||
"test_proxy.py", | ||
"test_qs.py", | ||
"test_required_args.py", | ||
"test_transform.py", | ||
"test_azure.py", | ||
"test_deepcopy.py" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 1 @@ | ||
0.4.7 | ||
0.4.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
extensions/inference-nitro-extension/resources/models/aya-23-35b/model.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,35 @@ | ||
{ | ||
"sources": [ | ||
{ | ||
"filename": "aya-23-35B-Q4_K_M.gguf", | ||
"url": "https://huggingface.co/bartowski/aya-23-35B-GGUF/resolve/main/aya-23-35B-Q4_K_M.gguf" | ||
} | ||
], | ||
"id": "aya-23-35b", | ||
"object": "model", | ||
"name": "Aya 23 35B Q4", | ||
"version": "1.0", | ||
"description": "Aya 23 can talk upto 23 languages fluently.", | ||
"format": "gguf", | ||
"settings": { | ||
"ctx_len": 8192, | ||
"prompt_template": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{system_prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>", | ||
"llama_model_path": "aya-23-35B-Q4_K_M.gguf", | ||
"ngl": 40 | ||
}, | ||
"parameters": { | ||
"temperature": 0.7, | ||
"top_p": 0.95, | ||
"stream": true, | ||
"max_tokens": 8192, | ||
"frequency_penalty": 0, | ||
"presence_penalty": 0, | ||
"stop": ["<|END_OF_TURN_TOKEN|>"] | ||
}, | ||
"metadata": { | ||
"author": "CohereForAI", | ||
"tags": ["34B", "Finetuned"], | ||
"size": 21556982144 | ||
}, | ||
"engine": "nitro" | ||
} |
35 changes: 35 additions & 0 deletions
35
extensions/inference-nitro-extension/resources/models/aya-23-8b/model.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,35 @@ | ||
{ | ||
"sources": [ | ||
{ | ||
"filename": "aya-23-8B-Q4_K_M.gguf", | ||
"url": "https://huggingface.co/bartowski/aya-23-8B-GGUF/resolve/main/aya-23-8B-Q4_K_M.gguf" | ||
} | ||
], | ||
"id": "aya-23-8b", | ||
"object": "model", | ||
"name": "Aya 23 8B Q4", | ||
"version": "1.0", | ||
"description": "Aya 23 can talk upto 23 languages fluently.", | ||
"format": "gguf", | ||
"settings": { | ||
"ctx_len": 8192, | ||
"prompt_template": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{system_prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>", | ||
"llama_model_path": "aya-23-8B-Q4_K_M.gguf", | ||
"ngl": 32 | ||
}, | ||
"parameters": { | ||
"temperature": 0.7, | ||
"top_p": 0.95, | ||
"stream": true, | ||
"max_tokens": 8192, | ||
"frequency_penalty": 0, | ||
"presence_penalty": 0, | ||
"stop": ["<|END_OF_TURN_TOKEN|>"] | ||
}, | ||
"metadata": { | ||
"author": "CohereForAI", | ||
"tags": ["7B", "Finetuned","Featured"], | ||
"size": 5056982144 | ||
}, | ||
"engine": "nitro" | ||
} |
Oops, something went wrong.