Instructions to use umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final") - Transformers
How to use umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final
- SGLang
How to use umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final with Docker Model Runner:
docker model run hf.co/umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final
| license: apache-2.0 | |
| base_model: Qwen/Qwen2.5-0.5B-Instruct | |
| library_name: peft | |
| model_name: model_regulations-eu_grupo8-SharonCalcina_final | |
| pipeline_tag: text-generation | |
| tags: | |
| - base_model:adapter:Qwen/Qwen2.5-0.5B-Instruct | |
| - lora | |
| - sft | |
| - gdpr | |
| - legal | |
| - transformers | |
| - trl | |
| # GRUPO # 8 | |
| Integrantes: | |
| - Sharon Añejandra Calcina | |
| # GDPR Q&A – Qwen2.5 LoRA Model | |
| This repository contains **LoRA adapters** fine-tuned on a **GDPR Question–Answering dataset** | |
| derived from **Regulation (EU) 2016/679 (GDPR)**. | |
| The model is intended for **educational and informational purposes only** and does **not** | |
| provide legal advice. | |
| ## Academic Information | |
| - **Course / Practice**: Fine-tuning & Distillation (GDPR QA) | |
| - **Group**: **Grupo 8** | |
| - **Students**: | |
| - Sharon Alejandra Calcina | |
| - **Organization**: `umsa-v1` | |
| ## Base Model | |
| - **Base model**: `Qwen/Qwen2.5-0.5B-Instruct` | |
| - **Fine-tuning method**: Supervised Fine-Tuning (SFT) | |
| - **Adaptation**: LoRA (PEFT) | |
| ## Dataset | |
| The model was trained using the following dataset: | |
| https://huggingface.co/datasets/umsa-v1/dataset_regulations-eu_grupo8-SharonCalcina_final | |
| The dataset contains GDPR-related question–answer pairs with paraphrased variants. | |
| ## Quick Start | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| from peft import PeftModel | |
| base_model = AutoModelForCausalLM.from_pretrained( | |
| "Qwen/Qwen2.5-0.5B-Instruct", | |
| device_map="auto" | |
| ) | |
| model = PeftModel.from_pretrained( | |
| base_model, | |
| "umsa-v1/model_regulations-eu_grupo8-SharonCalcina_final" | |
| ) | |
| tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") | |
| prompt = "What rights does a data subject have under GDPR?" | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate(**inputs, max_new_tokens=200) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| # Model Card for qwen2_5_lora_grupo3 | |
| This model is a fine-tuned version of [Qwen/Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct). | |
| It has been trained using [TRL](https://github.com/huggingface/trl). | |
| ## Training procedure | |
| This model was trained using **Supervised Fine-Tuning (SFT)** with a | |
| Low-Rank Adaptation (LoRA) approach on top of the | |
| Qwen/Qwen2.5-0.5B-Instruct base model. | |
| The training data consists of GDPR-related question–answer pairs with | |
| paraphrased variants. | |
| ### Framework versions | |
| - PEFT: 0.18.1 | |
| - TRL: 0.27.2 | |
| - Transformers: 5.1.0 | |
| - PyTorch: 2.1.0 | |
| - Datasets: 4.5.0 | |
| - Tokenizers: 0.22.2 | |
| ## 📖 Citations | |
| If you use TRL, please cite: | |
| ```bibtex | |
| @misc{vonwerra2022trl, | |
| title = {{TRL: Transformer Reinforcement Learning}}, | |
| author = {Leandro von Werra and Younes Belkada and Lewis Tunstall | |
| and Edward Beeching and Tristan Thrush and Nathan Lambert | |
| and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, | |
| year = 2022, | |
| journal = {GitHub repository}, | |
| publisher = {GitHub}, | |
| howpublished = {\url{https://github.com/huggingface/trl}} | |
| } | |