[Misc] Add Qwen2.5-Omni-3B model support to Gradio demo (#1382)
Signed-off-by: UsamaKenway <usamakenway@gmail.com>
This commit is contained in:
1 parent
6c85ddcb96
commit
d8a32a6a87
1 file changed
+35
-30
@@ -15,38 +15,43 @@ from PIL import Image
|
|||||||
|
|
||||||
SEED = 42
|
SEED = 42
|
||||||
|
|
||||||
|
DEFAULT_SAMPLING_PARAMS = {
|
||||||
|
"thinker": {
|
||||||
|
"temperature": 0.0,
|
||||||
|
"top_p": 1.0,
|
||||||
|
"top_k": -1,
|
||||||
|
"max_tokens": 2048,
|
||||||
|
"seed": SEED,
|
||||||
|
"detokenize": True,
|
||||||
|
"repetition_penalty": 1.1,
|
||||||
|
},
|
||||||
|
"talker": {
|
||||||
|
"temperature": 0.9,
|
||||||
|
"top_p": 0.8,
|
||||||
|
"top_k": 40,
|
||||||
|
"max_tokens": 2048,
|
||||||
|
"seed": SEED,
|
||||||
|
"detokenize": True,
|
||||||
|
"repetition_penalty": 1.05,
|
||||||
|
"stop_token_ids": [8294],
|
||||||
|
},
|
||||||
|
"code2wav": {
|
||||||
|
"temperature": 0.0,
|
||||||
|
"top_p": 1.0,
|
||||||
|
"top_k": -1,
|
||||||
|
"max_tokens": 2048,
|
||||||
|
"seed": SEED,
|
||||||
|
"detokenize": True,
|
||||||
|
"repetition_penalty": 1.1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
SUPPORTED_MODELS: dict[str, dict[str, Any]] = {
|
SUPPORTED_MODELS: dict[str, dict[str, Any]] = {
|
||||||
|
"Qwen/Qwen2.5-Omni-3B": {
|
||||||
|
"sampling_params": DEFAULT_SAMPLING_PARAMS,
|
||||||
|
},
|
||||||
"Qwen/Qwen2.5-Omni-7B": {
|
"Qwen/Qwen2.5-Omni-7B": {
|
||||||
"sampling_params": {
|
"sampling_params": DEFAULT_SAMPLING_PARAMS,
|
||||||
"thinker": {
|
|
||||||
"temperature": 0.0,
|
|
||||||
"top_p": 1.0,
|
|
||||||
"top_k": -1,
|
|
||||||
"max_tokens": 2048,
|
|
||||||
"seed": SEED,
|
|
||||||
"detokenize": True,
|
|
||||||
"repetition_penalty": 1.1,
|
|
||||||
},
|
|
||||||
"talker": {
|
|
||||||
"temperature": 0.9,
|
|
||||||
"top_p": 0.8,
|
|
||||||
"top_k": 40,
|
|
||||||
"max_tokens": 2048,
|
|
||||||
"seed": SEED,
|
|
||||||
"detokenize": True,
|
|
||||||
"repetition_penalty": 1.05,
|
|
||||||
"stop_token_ids": [8294],
|
|
||||||
},
|
|
||||||
"code2wav": {
|
|
||||||
"temperature": 0.0,
|
|
||||||
"top_p": 1.0,
|
|
||||||
"top_k": -1,
|
|
||||||
"max_tokens": 2048,
|
|
||||||
"seed": SEED,
|
|
||||||
"detokenize": True,
|
|
||||||
"repetition_penalty": 1.1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
# Ensure deterministic behavior across runs.
|
# Ensure deterministic behavior across runs.
|
||||||
|
|||||||
Reference in new issue
Block a user