Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vinid committed Jun 11, 2024
2 parents d6d7ac7 + 3e07bd8 commit 0c6f9a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ TextGrad can optimize unstructured variables, such as text. Let us have an initi

```python
import textgrad as tg
tg.set_backward_engine(tg.get_engine("gpt-4o"))
tg.set_backward_engine("gpt-4o")

initial_solution = """To solve the equation 3x^2 - 7x + 2 = 0, we use the quadratic formula:
x = (-b ± √(b^2 - 4ac)) / 2a
Expand Down Expand Up @@ -116,7 +116,7 @@ TextGrad can also optimize prompts in PyTorch style! Here's how to do it with Te
```python
import textgrad as tg
llm_engine = tg.get_engine("gpt-3.5-turbo")
tg.set_backward_engine(tg.get_engine("gpt-4o"))
tg.set_backward_engine("gpt-4o")

_, val_set, _, eval_fn = load_task("BBH_object_counting", llm_engine)
question_str, answer_str = val_set[0]
Expand Down
2 changes: 1 addition & 1 deletion evaluation/prompt_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def set_seed(seed):

def config():
parser = argparse.ArgumentParser(description="Optimize a prompt for a task.")
parser.add_argument("--task", type=str, default=" ", help="The task to evaluate the model on.")
parser.add_argument("--task", type=str, default="BBH_object_counting", help="The task to evaluate the model on.")
parser.add_argument("--evaluation_engine", type=str, default="gpt-4o", help="The API to use for evaluation.")
parser.add_argument("--test_engine", type=str, default="gpt-3.5-turbo-0125", help="The API to use for evaluation.")
parser.add_argument("--batch_size", type=int, default=3, help="The batch size to use for training.")
Expand Down

0 comments on commit 0c6f9a9

Please sign in to comment.