convaiinnovations commited on
Commit
cf7c54c
·
verified ·
1 Parent(s): bf2e02a

README: 8,192-token long documents on laya-multilingual, laya 0.3.18 notes

Browse files
Files changed (1) hide show
  1. README.md +11 -1
README.md CHANGED
@@ -19,6 +19,14 @@ Python 3.10 or newer. Optional extras: `laya[serve]` (HTTP server), `laya[mcp]`
19
 
20
  ## Quickstart
21
 
 
 
 
 
 
 
 
 
22
  ```python
23
  from laya import Router
24
 
@@ -62,10 +70,12 @@ The shipped checkpoints work zero-shot, but fine-tuning on decisions from your o
62
 
63
  **[nandhakishorm.github.io/laya](https://nandhakishorm.github.io/laya/)**: guides for [prediction hooks](https://nandhakishorm.github.io/laya/hooks/), [schema-driven decisions](https://nandhakishorm.github.io/laya/structured/), [Docker](https://nandhakishorm.github.io/laya/docker/) and [LangChain and LangGraph](https://nandhakishorm.github.io/laya/langchain/), plus a full [API reference](https://nandhakishorm.github.io/laya/reference/).
64
 
65
- ## What's new in laya 0.3.17
66
 
67
  The checkpoints themselves are unchanged. `pip install -U laya` for the latest runtime fixes:
68
 
 
 
69
  * **Sturdier fast path.** After a CUDA out-of-memory error the fallback to CPU switches the TileLang fast path off first, a single-option `choice` no longer crashes it, and concurrent calls can no longer overwrite each other's CUDA-graph buffers.
70
  * **Server and runtime.** `laya-serve` drains its inference pool on shutdown and returns 401 for a malformed bearer header, and `ONNXAgent` matches `Agent` on empty question sets and long conversation lists.
71
 
 
19
 
20
  ## Quickstart
21
 
22
+ > **Long documents: `laya-multilingual` reads up to 8,192 tokens.** It ships with a 1,024-token limit; raise it per call:
23
+ >
24
+ > ```python
25
+ > result = router.predict(long_document, questions, model="multilingual", max_len=8192)
26
+ > ```
27
+ >
28
+ > **Accuracy does not drop.** Short inputs give identical answers at either limit. On long inputs it improves: with the request placed after about 6,300 tokens of other text, 8 of 10 test requests were answered correctly at 8,192, against 3 of 10 at the default limit, which cuts the request off. **Speed:** short inputs run at the same speed, because the cost follows the input's real length, not the limit. Long inputs take longer in proportion to their length: a 6,300-token input took 2.5 s instead of 0.18 s on an Apple GPU (8 s instead of 0.35 s on CPU). Name the checkpoint with `model="multilingual"`, since long mostly-English text would otherwise route to the English checkpoint.
29
+
30
  ```python
31
  from laya import Router
32
 
 
70
 
71
  **[nandhakishorm.github.io/laya](https://nandhakishorm.github.io/laya/)**: guides for [prediction hooks](https://nandhakishorm.github.io/laya/hooks/), [schema-driven decisions](https://nandhakishorm.github.io/laya/structured/), [Docker](https://nandhakishorm.github.io/laya/docker/) and [LangChain and LangGraph](https://nandhakishorm.github.io/laya/langchain/), plus a full [API reference](https://nandhakishorm.github.io/laya/reference/).
72
 
73
+ ## What's new in laya 0.3.18
74
 
75
  The checkpoints themselves are unchanged. `pip install -U laya` for the latest runtime fixes:
76
 
77
+ * **Long documents on `laya-multilingual`:** read up to 8,192 tokens with `max_len=8192` (see the Quickstart).
78
+
79
  * **Sturdier fast path.** After a CUDA out-of-memory error the fallback to CPU switches the TileLang fast path off first, a single-option `choice` no longer crashes it, and concurrent calls can no longer overwrite each other's CUDA-graph buffers.
80
  * **Server and runtime.** `laya-serve` drains its inference pool on shutdown and returns 401 for a malformed bearer header, and `ONNXAgent` matches `Agent` on empty question sets and long conversation lists.
81