We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55c91f5 commit 59241d5Copy full SHA for 59241d5
dsp/modules/aws_models.py
@@ -49,6 +49,9 @@ def __init__(
49
self._max_context_size: int = max_context_size
50
self._max_new_tokens: int = max_new_tokens
51
52
+ # make it consistent with equivalent LM::max_token
53
+ self.kwargs["max_tokens"] = max_new_tokens
54
+
55
self.kwargs = {
56
**self.kwargs,
57
**kwargs,
@@ -63,7 +66,7 @@ def _call_model(self, body: str) -> str | list[str]:
63
66
"""Call model, get generated input without the formatted prompt."""
64
67
65
68
def _estimate_tokens(self, text: str) -> int:
- return len(text)/CHARS2TOKENS
69
+ return len(text) / CHARS2TOKENS
70
71
def _extract_input_parameters(
72
self,
0 commit comments