docsense.models.llmο
LLM (Large Language Model) wrapper implementation.
Classes
| 
 | Wrapper for Qwen language model. | 
- class LLMModel(model_name='Qwen/Qwen2-7B', device='cuda', max_length=2048, temperature=0.0, top_p=1.0, repetition_penalty=1.1)[source]ο
- Wrapper for Qwen language model. - Parameters:
 - __init__(model_name='Qwen/Qwen2-7B', device='cuda', max_length=2048, temperature=0.0, top_p=1.0, repetition_penalty=1.1)[source]ο
- Initialize the LLM model. - Parameters:
- model_name ( - str) β Name of the Qwen model to use
- device ( - str) β Device to run the model on (βcudaβ or βcpuβ)
- max_length ( - int) β Maximum sequence length for generation
- temperature ( - float) β Sampling temperature (0.0 for deterministic output)
- top_p ( - float) β Nucleus sampling parameter (1.0 for no filtering)
- repetition_penalty ( - float) β Penalty for repeating tokens