Skip to content

Commit 70f75ca

Browse files
committed
Use faster model for examples
Signed-off-by: elronbandel <[email protected]>
1 parent 8472838 commit 70f75ca

File tree

6 files changed

+62
-27
lines changed

6 files changed

+62
-27
lines changed

examples/evaluate_using_metrics_ensemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
split="test",
2828
)
2929

30-
# Infer using Llama-3.2-1B base using HF API
30+
# Infer using SmolLM2 using HF API
3131
model = HFPipelineBasedInferenceEngine(
32-
model_name="Qwen/Qwen1.5-0.5B-Chat", max_new_tokens=32
32+
model_name="HuggingFaceTB/SmolLM2-135M-Instruct", max_new_tokens=32
3333
)
3434
# Change to this to infer with external APIs:
3535
# CrossProviderInferenceEngine(model="llama-3-2-1b-instruct", provider="watsonx")

examples/ner_evaluation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
format="formats.chat_api",
3636
)
3737

38-
# Infer using Llama-3.2-1B base using HF API
38+
# Infer using SmolLM2 using HF API
3939
# model = HFPipelineBasedInferenceEngine(
40-
# model_name="Qwen/Qwen1.5-0.5B-Chat", max_new_tokens=32
40+
# model_name="HuggingFaceTB/SmolLM2-135M-Instruct", max_new_tokens=32
4141
# )
4242
# Change to this to infer with external APIs:
4343

examples/qa_evaluation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
format="formats.chat_api",
3131
)
3232

33-
# Infer using Llama-3.2-1B base using HF API
33+
# Infer using SmolLM2 using HF API
3434
model = HFPipelineBasedInferenceEngine(
35-
model_name="Qwen/Qwen1.5-0.5B-Chat", max_new_tokens=32
35+
model_name="HuggingFaceTB/SmolLM2-135M-Instruct", max_new_tokens=32
3636
)
3737
# Change to this to infer with external APIs:
3838
# from unitxt.inference import CrossProviderInferenceEngine

examples/standalone_evaluation_llm_as_judge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
max_test_instances=10,
9090
)
9191

92-
# Infer using Llama-3.2-1B base using HF API
92+
# Infer using SmolLM2 using HF API
9393
model = HFPipelineBasedInferenceEngine(
94-
model_name="Qwen/Qwen1.5-0.5B-Chat", max_new_tokens=32
94+
model_name="HuggingFaceTB/SmolLM2-135M-Instruct", max_new_tokens=32
9595
)
9696
predictions = model(dataset)
9797

examples/standalone_qa_evaluation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
)
3838

3939

40-
# Infer using Llama-3.2-1B base using HF API
40+
# Infer using SmolLM2 using HF API
4141
model = HFPipelineBasedInferenceEngine(
42-
model_name="Qwen/Qwen1.5-0.5B-Chat", max_new_tokens=32
42+
model_name="HuggingFaceTB/SmolLM2-135M-Instruct", max_new_tokens=32
4343
)
4444
# Change to this to infer with external APIs:
4545
# from unitxt.inference import CrossProviderInferenceEngine

utils/.secrets.baseline

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@
9090
{
9191
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
9292
},
93-
{
94-
"path": "detect_secrets.filters.common.is_baseline_file",
95-
"filename": "utils/.secrets.baseline"
96-
},
9793
{
9894
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
9995
"min_level": 2
@@ -127,22 +123,65 @@
127123
}
128124
],
129125
"results": {
126+
"examples/evaluate_using_metrics_ensemble.py": [
127+
{
128+
"type": "Base64 High Entropy String",
129+
"filename": "examples/evaluate_using_metrics_ensemble.py",
130+
"hashed_secret": "bed3655d44736098fa59a0661d724a73da7c5654",
131+
"is_verified": false,
132+
"line_number": 32
133+
}
134+
],
135+
"examples/ner_evaluation.py": [
136+
{
137+
"type": "Base64 High Entropy String",
138+
"filename": "examples/ner_evaluation.py",
139+
"hashed_secret": "bed3655d44736098fa59a0661d724a73da7c5654",
140+
"is_verified": false,
141+
"line_number": 40
142+
}
143+
],
144+
"examples/qa_evaluation.py": [
145+
{
146+
"type": "Base64 High Entropy String",
147+
"filename": "examples/qa_evaluation.py",
148+
"hashed_secret": "bed3655d44736098fa59a0661d724a73da7c5654",
149+
"is_verified": false,
150+
"line_number": 35
151+
}
152+
],
153+
"examples/standalone_evaluation_llm_as_judge.py": [
154+
{
155+
"type": "Base64 High Entropy String",
156+
"filename": "examples/standalone_evaluation_llm_as_judge.py",
157+
"hashed_secret": "bed3655d44736098fa59a0661d724a73da7c5654",
158+
"is_verified": false,
159+
"line_number": 94
160+
}
161+
],
162+
"examples/standalone_qa_evaluation.py": [
163+
{
164+
"type": "Base64 High Entropy String",
165+
"filename": "examples/standalone_qa_evaluation.py",
166+
"hashed_secret": "bed3655d44736098fa59a0661d724a73da7c5654",
167+
"is_verified": false,
168+
"line_number": 42
169+
}
170+
],
130171
"src/unitxt/inference.py": [
131172
{
132173
"type": "Secret Keyword",
133174
"filename": "src/unitxt/inference.py",
134175
"hashed_secret": "aa6cd2a77de22303be80e1f632195d62d211a729",
135176
"is_verified": false,
136-
"line_number": 1294,
137-
"is_secret": false
177+
"line_number": 1294
138178
},
139179
{
140180
"type": "Secret Keyword",
141181
"filename": "src/unitxt/inference.py",
142182
"hashed_secret": "c8f16a194efc59559549c7bd69f7bea038742e79",
143183
"is_verified": false,
144-
"line_number": 1779,
145-
"is_secret": false
184+
"line_number": 1779
146185
}
147186
],
148187
"src/unitxt/loaders.py": [
@@ -151,8 +190,7 @@
151190
"filename": "src/unitxt/loaders.py",
152191
"hashed_secret": "840268f77a57d5553add023cfa8a4d1535f49742",
153192
"is_verified": false,
154-
"line_number": 595,
155-
"is_secret": false
193+
"line_number": 595
156194
}
157195
],
158196
"src/unitxt/metrics.py": [
@@ -161,8 +199,7 @@
161199
"filename": "src/unitxt/metrics.py",
162200
"hashed_secret": "fa172616e9af3d2a24b5597f264eab963fe76889",
163201
"is_verified": false,
164-
"line_number": 70,
165-
"is_secret": false
202+
"line_number": 70
166203
}
167204
],
168205
"tests/library/test_loaders.py": [
@@ -171,18 +208,16 @@
171208
"filename": "tests/library/test_loaders.py",
172209
"hashed_secret": "8d814baafe5d8412572dc520dcab83f60ce1375c",
173210
"is_verified": false,
174-
"line_number": 125,
175-
"is_secret": false
211+
"line_number": 125
176212
},
177213
{
178214
"type": "Secret Keyword",
179215
"filename": "tests/library/test_loaders.py",
180216
"hashed_secret": "42a472ac88cd8d43a2c5ae0bd0bdf4626cdaba31",
181217
"is_verified": false,
182-
"line_number": 135,
183-
"is_secret": false
218+
"line_number": 135
184219
}
185220
]
186221
},
187-
"generated_at": "2025-02-12T09:37:42Z"
222+
"generated_at": "2025-02-13T13:37:19Z"
188223
}

0 commit comments

Comments
 (0)