Skip to content

Commit 4e043ea

Browse files
committed
some fixes
1 parent 8540529 commit 4e043ea

3 files changed

Lines changed: 18 additions & 26 deletions

File tree

docs/notebook_source/1-the-basics.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,18 @@
7272
MODEL_ID = "nvidia/nemotron-3-nano-30b-a3b"
7373

7474
# We choose this alias to be descriptive for our use case.
75-
MODEL_ALIAS = "nemotron-nano-v2"
76-
77-
# This sets reasoning to False for the nemotron-nano-v2 model.
78-
SYSTEM_PROMPT = "/no_think"
75+
MODEL_ALIAS = "nemotron-nano-v3"
7976

8077
model_configs = [
8178
ModelConfig(
8279
alias=MODEL_ALIAS,
8380
model=MODEL_ID,
8481
provider=MODEL_PROVIDER,
8582
inference_parameters=ChatCompletionInferenceParams(
86-
temperature=0.5,
83+
temperature=1.0,
8784
top_p=1.0,
88-
max_tokens=1024,
85+
max_tokens=2048,
86+
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
8987
),
9088
)
9189
]
@@ -252,7 +250,6 @@
252250
"on products related to '{{ product_subcategory }}'. The target age range of the ideal customer is "
253251
"{{ target_age_range }} years old. Respond with only the product name, no other text."
254252
),
255-
system_prompt=SYSTEM_PROMPT,
256253
model_alias=MODEL_ALIAS,
257254
)
258255
)
@@ -264,9 +261,9 @@
264261
"You are a customer named {{ customer.first_name }} from {{ customer.city }}, {{ customer.state }}. "
265262
"You are {{ customer.age }} years old and recently purchased a product called {{ product_name }}. "
266263
"Write a review of this product, which you gave a rating of {{ number_of_stars }} stars. "
267-
"The style of the review should be '{{ review_style }}'."
264+
"The style of the review should be '{{ review_style }}'. "
265+
"Respond with only the review, no other text."
268266
),
269-
system_prompt=SYSTEM_PROMPT,
270267
model_alias=MODEL_ALIAS,
271268
)
272269
)

docs/notebook_source/2-structured-outputs-and-jinja-expressions.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,18 @@
7474
MODEL_ID = "nvidia/nemotron-3-nano-30b-a3b"
7575

7676
# We choose this alias to be descriptive for our use case.
77-
MODEL_ALIAS = "nemotron-nano-v2"
78-
79-
# This sets reasoning to False for the nemotron-nano-v2 model.
80-
SYSTEM_PROMPT = "/no_think"
77+
MODEL_ALIAS = "nemotron-nano-v3"
8178

8279
model_configs = [
8380
ModelConfig(
8481
alias=MODEL_ALIAS,
8582
model=MODEL_ID,
8683
provider=MODEL_PROVIDER,
8784
inference_parameters=ChatCompletionInferenceParams(
88-
temperature=0.5,
85+
temperature=1.0,
8986
top_p=1.0,
90-
max_tokens=1024,
87+
max_tokens=2048,
88+
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
9189
),
9290
)
9391
]
@@ -286,7 +284,6 @@ class ProductReview(BaseModel):
286284
"related to '{{ product_subcategory }}'. The target age range of the ideal customer is "
287285
"{{ target_age_range }} years old. The product should be priced between $10 and $1000."
288286
),
289-
system_prompt=SYSTEM_PROMPT,
290287
output_format=Product,
291288
model_alias=MODEL_ALIAS,
292289
)
@@ -304,12 +301,12 @@ class ProductReview(BaseModel):
304301
"Imagine your name is {{ customer_name }} and you are from {{ customer.city }}, {{ customer.state }}. "
305302
"Write the review in a style that is '{{ review_style }}'."
306303
"{% if target_age_range == '18-25' %}"
307-
"Make sure the review is more informal and conversational."
304+
"Make sure the review is more informal and conversational.\n"
308305
"{% else %}"
309-
"Make sure the review is more formal and structured."
306+
"Make sure the review is more formal and structured.\n"
310307
"{% endif %}"
308+
"The review field should contain only the review, no other text."
311309
),
312-
system_prompt=SYSTEM_PROMPT,
313310
output_format=ProductReview,
314311
model_alias=MODEL_ALIAS,
315312
)

docs/notebook_source/3-seeding-with-a-dataset.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,18 @@
6868
MODEL_ID = "nvidia/nemotron-3-nano-30b-a3b"
6969

7070
# We choose this alias to be descriptive for our use case.
71-
MODEL_ALIAS = "nemotron-nano-v2"
72-
73-
# This sets reasoning to False for the nemotron-nano-v2 model.
74-
SYSTEM_PROMPT = "/no_think"
71+
MODEL_ALIAS = "nemotron-nano-v3"
7572

7673
model_configs = [
7774
ModelConfig(
7875
alias=MODEL_ALIAS,
7976
model=MODEL_ID,
8077
provider=MODEL_PROVIDER,
8178
inference_parameters=ChatCompletionInferenceParams(
82-
temperature=0.5,
79+
temperature=1.0,
8380
top_p=1.0,
84-
max_tokens=1024,
81+
max_tokens=2048,
82+
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
8583
),
8684
)
8785
]
@@ -220,9 +218,9 @@
220218
as Dr. {{ doctor_sampler.first_name }} {{ doctor_sampler.last_name }}.
221219
222220
Format the notes as a busy doctor might.
221+
Respond with only the notes, no other text.
223222
""",
224223
model_alias=MODEL_ALIAS,
225-
system_prompt=SYSTEM_PROMPT,
226224
)
227225

228226
config_builder.validate()

0 commit comments

Comments
 (0)