Skip to content

Commit 3b0cb10

Browse files
committed
Updte notebook
1 parent 85f9715 commit 3b0cb10

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

quickstart.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@
105105
"name": "stderr",
106106
"output_type": "stream",
107107
"text": [
108-
"/home/sharifm/students/matanbentov/my_conda/envs/default/lib/python3.10/site-packages/pydantic/_internal/_generate_schema.py:2249: UnsupportedFieldAttributeWarning: The 'repr' attribute with value False was provided to the `Field()` function, which has no effect in the context it was used. 'repr' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.\n",
108+
".../site-packages/pydantic/_internal/_generate_schema.py:2249: UnsupportedFieldAttributeWarning: The 'repr' attribute with value False was provided to the `Field()` function, which has no effect in the context it was used. 'repr' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.\n",
109109
" warnings.warn(\n",
110-
"/home/sharifm/students/matanbentov/my_conda/envs/default/lib/python3.10/site-packages/pydantic/_internal/_generate_schema.py:2249: UnsupportedFieldAttributeWarning: The 'frozen' attribute with value True was provided to the `Field()` function, which has no effect in the context it was used. 'frozen' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.\n",
110+
".../site-packages/pydantic/_internal/_generate_schema.py:2249: UnsupportedFieldAttributeWarning: The 'frozen' attribute with value True was provided to the `Field()` function, which has no effect in the context it was used. 'frozen' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.\n",
111111
" warnings.warn(\n"
112112
]
113113
},
@@ -315,7 +315,7 @@
315315
"### 2b. Multi-instruction optimization\n",
316316
"\n",
317317
"As another variant of the recipe, which is considered to create more _universal_ jailbreak suffix, you can \n",
318-
"pass multiple templates to optimize a single trigger against them all of them simultaneously."
318+
"pass multiple templates to optimize a single trigger against all of them simultaneously."
319319
]
320320
},
321321
{
@@ -457,7 +457,7 @@
457457
],
458458
"source": [
459459
"# Embed multiple Harry Potter queries and average them into a \"concept\" centroid.\n",
460-
"# A trigger optimized toward this centroid will steer an attacker-controlled\n",
460+
"# A trigger optimized toward this centroid will steer an attacker-controlled passage toward these queries in retrieval.\n",
461461
"hp_queries = [\n",
462462
" \"Who is Harry Potter?\",\n",
463463
" \"Tell me about the Harry Potter series.\",\n",
@@ -845,7 +845,7 @@
845845
],
846846
"source": [
847847
"# Optimize a trigger appended to an off-topic passage so that its\n",
848-
"# OpenAI embedding aligns with the embedding of `target_text`.\n",
848+
"# OpenAI embedding aligns with the target centroid (`target_vector`).\n",
849849
"loss = SimilarityLoss() # minimizes −cosine_similarity → maximizes alignment\n",
850850
"\n",
851851
"optimizer = RandomSearchOptimizer(\n",
@@ -875,7 +875,7 @@
875875
"\n",
876876
"In TROPT you can also easily customize losses and build new optimizers.\n",
877877
"\n",
878-
"Concretely, to create a new loss, you implement its core computation logic, accepting standardized parameters (resolved from `[ModelInput](https://tropt.dev/api/common.html#tropt.common.ModelInput)`, `[ModelOutput](https://tropt.dev/api/common.html#tropt.common.ModelOutput)`, and `[MessageTargets](https://tropt.dev/api/common.html#tropt.common.MessageTargets)`), with no registration required.\n",
878+
"Concretely, to create a new loss, you implement its core computation logic, accepting standardized parameters (resolved from [`ModelInput`](https://tropt.dev/api/common.html#tropt.common.ModelInput), [`ModelOutput`](https://tropt.dev/api/common.html#tropt.common.ModelOutput), and [`MessageTargets`](https://tropt.dev/api/common.html#tropt.common.MessageTargets)), with no registration required.\n",
879879
"Similarly, implementing a new optimizer requires defining its core search algorithm around a compact interface that connects it to TROPT's framework — fitting it with all compatible models, losses, etc.\n",
880880
"\n",
881881
"Below we define both from scratch and run them against an encoder model.\n",

0 commit comments

Comments
 (0)