set max tokens to 5k
This commit is contained in:
@@ -215,7 +215,7 @@ class TorchModelShard:
|
|||||||
def generate_text(
|
def generate_text(
|
||||||
self,
|
self,
|
||||||
messages: list[dict],
|
messages: list[dict],
|
||||||
max_new_tokens: int = 256,
|
max_new_tokens: int = 5120,
|
||||||
temperature: float = 1.0,
|
temperature: float = 1.0,
|
||||||
top_p: float = 1.0,
|
top_p: float = 1.0,
|
||||||
) -> str:
|
) -> str:
|
||||||
@@ -245,7 +245,7 @@ class TorchModelShard:
|
|||||||
def generate_text_streaming(
|
def generate_text_streaming(
|
||||||
self,
|
self,
|
||||||
messages: list[dict],
|
messages: list[dict],
|
||||||
max_new_tokens: int = 256,
|
max_new_tokens: int = 5000,
|
||||||
temperature: float = 1.0,
|
temperature: float = 1.0,
|
||||||
top_p: float = 1.0,
|
top_p: float = 1.0,
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ class _TorchHandler(http.server.BaseHTTPRequestHandler):
|
|||||||
if backend is None or not backend.is_head:
|
if backend is None or not backend.is_head:
|
||||||
self._send_json(400, {"error": "model not loaded on this node"})
|
self._send_json(400, {"error": "model not loaded on this node"})
|
||||||
return
|
return
|
||||||
max_tokens = int(body.get("max_tokens") or body.get("max_new_tokens") or 256)
|
max_tokens = int(body.get("max_tokens") or body.get("max_new_tokens") or 5120)
|
||||||
temperature = float(body.get("temperature") or 1.0)
|
temperature = float(body.get("temperature") or 1.0)
|
||||||
top_p = float(body.get("top_p") or 1.0)
|
top_p = float(body.get("top_p") or 1.0)
|
||||||
|
|
||||||
|
|||||||
@@ -930,7 +930,7 @@ async function sendChat() {
|
|||||||
{ role: "user", content: prompt },
|
{ role: "user", content: prompt },
|
||||||
],
|
],
|
||||||
stream: false,
|
stream: false,
|
||||||
max_tokens: 256,
|
max_tokens: 15120,
|
||||||
};
|
};
|
||||||
chatBusy = true;
|
chatBusy = true;
|
||||||
$("chat-send").disabled = true;
|
$("chat-send").disabled = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user