xTuring
xTuring copied to clipboard
Add merge_and_unload() func for LoraModel
PR Summary
- Fixed: Resolved AttributeError: 'LlamaTokenizer' object has no attribute 'sp_model' in llama_utils module (file: src/xturing/engines/llama_utils/llama.py).
- Feature Addition: Implemented merge_and_unload() method in LoraModel to enhance model handling (file: src/xturing/engines/lora_engine/lora.py).
- Enhancement: Improved the forward() function in Linear and MergedLinear classes to optimize performance and model behavior (file: src/xturing/engines/lora_engine/lora.py).
- New Example: Added an example showcasing merge_and_unload() usage in llama_lora.py (file: examples/models/llama/llama_lora.py). These changes improve model utility and provide better functionality for Lora integration.