Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

How to solve the problem of context loss when Jan-nano processes long documents?

2025-08-21 539
Link directMobile View
qrcode

Complete solution for long document processing

It needs to be realized by hardware configuration and parameter tuning:

  • Switch to 128k version: Jan-nano-128k natively supports 128k tokens context windows, with key arguments added at startup:--rope-scaling '{"rope_type":"yarn","factor":3.2,"original_max_position_embeddings":40960}' --max-model-len 131072
  • Improved input formats: Use XML/JSON markup segmentation (e.g.<section>...</section>) to help the model recognize document structure
  • Memory Optimization Tips: Shut down extraneous processes and reserve swap space at least 1.5 times the size of the model

For very long documents (e.g., books), the recommendation is: first pass theLlamaIndexand other tools to construct vector indexes, and then process them in sections

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top