Skip to content

Commit 82f7779

Browse files
authored
enh(text-to-text): Update default to Qwen2.5-3B-Instruct. (#93)
It has 2x context lenght and has better score in https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/
1 parent f9e0728 commit 82f7779

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The architecture of this codebase focuses on modularity and adaptability, meanin
102102
103103
### text-to-text
104104
105-
We are using the [llama.cpp](https://github.com/ggerganov/llama.cpp) library, which supports open source models optimized for local inference and minimal hardware requirements. The default text-to-text model in this repo is the open source [OLMoE-7B-Instruct](https://huggingface.co/allenai/OLMoE-1B-7B-0924-Instruct) from [AllenAI](https://allenai.org/).
105+
We are using the [llama.cpp](https://github.com/ggerganov/llama.cpp) library, which supports open source models optimized for local inference and minimal hardware requirements. The default text-to-text model in this repo is the open source [Qwen2.5-3B-Instruct](https://huggingface.co/bartowski/Qwen2.5-3B-Instruct-GGUF).
106106
107107
For the complete list of models supported out-of-the-box, visit this [link](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#text-only).
108108

demo/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@st.cache_resource
2323
def load_text_to_text_model():
2424
return load_llama_cpp_model(
25-
model_id="allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf"
25+
model_id="bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf"
2626
)
2727

2828

@@ -117,7 +117,7 @@ def gen_button_clicked():
117117

118118
st.markdown(
119119
"For this demo, we are using the following models: \n"
120-
"- [OLMoE-1B-7B-0924-Instruct](https://huggingface.co/allenai/OLMoE-1B-7B-0924-Instruct-GGUF)\n"
120+
"- [Qwen2.5-3B-Instruct](https://huggingface.co/bartowski/Qwen2.5-3B-Instruct-GGUF)\n"
121121
"- [OuteAI/OuteTTS-0.2-500M](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF)"
122122
)
123123
st.markdown(

demo/notebook.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"metadata": {},
173173
"source": [
174174
"For this demo, we are using the following models:\n",
175-
" - [OLMoE-1B-7B-0924-Instruct](https://huggingface.co/allenai/OLMoE-1B-7B-0924-Instruct-GGUF)\n",
175+
" - [Qwen2.5-3B-Instruct](https://huggingface.co/bartowski/Qwen2.5-3B-Instruct-GGUF)\n",
176176
" - [OuteAI/OuteTTS-0.2-500M-GGUF/OuteTTS-0.2-500M-FP16.gguf](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF)"
177177
]
178178
},
@@ -195,7 +195,7 @@
195195
")\n",
196196
"\n",
197197
"text_model = load_llama_cpp_model(\n",
198-
" \"allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf\"\n",
198+
" \"bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf\"\n",
199199
")\n",
200200
"speech_model = load_tts_model(\"OuteAI/OuteTTS-0.2-500M-GGUF/OuteTTS-0.2-500M-FP16.gguf\")"
201201
]

docs/step-by-step-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ from document_to_podcast.inference.text_to_text import text_to_text, text_to_tex
106106

107107
# Load the model
108108
model = load_llama_cpp_model(
109-
"allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf"
109+
"bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf"
110110
)
111111

112112
# Define your input and system prompt

example_data/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
input_file: "example_data/introducing-mozilla-ai-investing-in-trustworthy-ai.html"
22
output_folder: "example_data/"
3-
text_to_text_model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf"
3+
text_to_text_model: "bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf"
44
text_to_speech_model: "OuteAI/OuteTTS-0.1-350M-GGUF/OuteTTS-0.1-350M-FP16.gguf"
55
text_to_text_prompt: |
66
You are a podcast scriptwriter generating engaging and natural-sounding conversations in JSON format.

src/document_to_podcast/cli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
Speaker,
1212
DEFAULT_PROMPT,
1313
DEFAULT_SPEAKERS,
14-
TTS_LOADERS,
1514
)
1615
from document_to_podcast.inference.model_loaders import (
1716
load_llama_cpp_model,
@@ -27,9 +26,9 @@
2726
def document_to_podcast(
2827
input_file: str | None = None,
2928
output_folder: str | None = None,
30-
text_to_text_model: str = "allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf",
29+
text_to_text_model: str = "bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf",
3130
text_to_text_prompt: str = DEFAULT_PROMPT,
32-
text_to_speech_model: TTS_LOADERS = "OuteAI/OuteTTS-0.2-500M-GGUF/OuteTTS-0.2-500M-FP16.gguf",
31+
text_to_speech_model: str = "OuteAI/OuteTTS-0.2-500M-GGUF/OuteTTS-0.2-500M-FP16.gguf",
3332
speakers: list[Speaker] | None = None,
3433
outetts_language: str = "en", # Only applicable to OuteTTS models
3534
from_config: str | None = None,
@@ -59,7 +58,7 @@ def document_to_podcast(
5958
6059
Need to be a gguf file.
6160
62-
Defaults to `allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf`.
61+
Defaults to `bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf`.
6362
6463
text_to_text_prompt (str, optional): The prompt for the text-to-text model.
6564
Defaults to DEFAULT_PROMPT.

src/document_to_podcast/inference/model_loaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def load_llama_cpp_model(model_id: str) -> Llama:
1010
Loads the given model_id using Llama.from_pretrained.
1111
1212
Examples:
13-
>>> model = load_llama_cpp_model("allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf")
13+
>>> model = load_llama_cpp_model("bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf")
1414
1515
Args:
1616
model_id (str): The model id to load.

0 commit comments

Comments
 (0)