Skip to content

Commit 965f907

Browse files
authored
Remove mistral-common from modeling libraries (#1652)
Related to #1641 and especially #1641 (comment) (cc @LysandreJik @juliendenize). The plan is: - set ```yaml library_name: transformers tags: - mistral-common ``` in model cards metadata - remove `mistral-common` from registered libraries as it's not a modelling library but more of a set of utils - count downloads on both `config.json` AND `params.json` for those repos (will be handled server-side, see [private PR](huggingface-internal/moon-landing#14564)) - keep custom indications in the vLLM snippets for `mistral-common` repos
1 parent fce9e5e commit 965f907

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,23 +2024,4 @@ torchaudio.save("sample.wav", audio, model.autoencoder.sampling_rate)
20242024
`,
20252025
];
20262026

2027-
export const mistral_common = (model: ModelData): string[] => [
2028-
`# We recommend to use vLLM to serve Mistral AI models.
2029-
pip install vllm
2030-
2031-
# Make sure to have installed the latest version of mistral-common.
2032-
pip install --upgrade mistral-common[image,audio]
2033-
2034-
# Serve the model with an OpenAI-compatible API.
2035-
vllm serve ${model.id} --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice
2036-
2037-
# Query the model with curl in a separate terminal.
2038-
curl http://localhost:8000/v1/chat/completions \
2039-
-H "Content-Type: application/json" \
2040-
-d '{
2041-
"model": "${model.id}",
2042-
"messages": [{"role": "user", "content": "What is the capital of France?"}]
2043-
}'`,
2044-
];
2045-
20462027
//#endregion

packages/tasks/src/model-libraries.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface LibraryUiElement {
3232
* Elastic query used to count this library's model downloads
3333
*
3434
* By default, those files are counted:
35-
* "config.json", "config.yaml", "hyperparams.yaml", "meta.yaml"
35+
* "config.json", "config.yaml", "hyperparams.yaml", "params.json", "meta.yaml"
3636
*/
3737
countDownloads?: ElasticSearchQuery;
3838
/**
@@ -631,14 +631,6 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
631631
filter: false,
632632
countDownloads: `path_extension:"ckpt"`,
633633
},
634-
mistral_common: {
635-
prettyLabel: "mistral-common",
636-
repoName: "mistral-common",
637-
repoUrl: "https://github.com/mistralai/mistral-common",
638-
docsUrl: "https://mistralai.github.io/mistral-common/",
639-
snippets: snippets.mistral_common,
640-
countDownloads: `path:"config.json" OR path:"params.json"`,
641-
},
642634
mitie: {
643635
prettyLabel: "MITIE",
644636
repoName: "MITIE",

0 commit comments

Comments
 (0)