llm-semantic-router/lora_intent_classifier_roberta-base_model
061
1---2license: apache-2.03base_model: roberta-base4tags:5- lora6- semantic-router7- intent-classification8- text-classification9- candle10- rust11language:12- en13pipeline_tag: text-classification14library_name: candle15---16 17# lora_intent_classifier_roberta-base_model18 19## Model Description20 21This is a LoRA (Low-Rank Adaptation) fine-tuned model based on **roberta-base** for Intent Classification - Classifies text into categories like business, technology, science, etc..22 23This model is part of the [semantic-router](https://github.com/vllm-project/semantic-router) project and is optimized for use with the Candle framework in Rust.24 25## Model Details26 27- **Base Model**: roberta-base28- **Task**: Intent Classification29- **Framework**: Candle (Rust)30- **Model Size**: ~476MB31- **LoRA Rank**: N/A32- **LoRA Alpha**: N/A33- **Target Modules**: 34 35## Usage36 37### With semantic-router (Recommended)38 39```python40from semantic_router import SemanticRouter41 42# The model will be automatically downloaded and used43router = SemanticRouter()44results = router.classify_batch(["Your text here"])45```46 47### With Candle (Rust)48 49```rust50use candle_core::{Device, Tensor};51use candle_transformers::models::bert::BertModel;52 53// Load the model using Candle54let device = Device::Cpu;55let model = BertModel::load(&device, &config, &weights)?;56```57 58## Training Details59 60This model was fine-tuned using LoRA (Low-Rank Adaptation) technique:61 62- **Rank**: 1663- **Alpha**: 32 64- **Dropout**: 0.165- **Target Modules**: 66 67## Performance68 69Intent Classification - Classifies text into categories like business, technology, science, etc.70 71For detailed performance metrics, see the [training results](https://github.com/vllm-project/semantic-router/blob/main/training-result.md).72 73## Files74 75- `model.safetensors`: LoRA adapter weights76- `config.json`: Model configuration77- `lora_config.json`: LoRA-specific configuration78- `tokenizer.json`: Tokenizer configuration79- `label_mapping.json`: Label mappings for classification80 81## Citation82 83If you use this model, please cite:84 85```bibtex86@misc{semantic-router-lora,87 title={LoRA Fine-tuned Models for Semantic Router},88 author={Semantic Router Team},89 year={2025},90 url={https://github.com/vllm-project/semantic-router}91}92```93 94## License95 96Apache 2.097 