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
Update README.md
Browse files
README.md
CHANGED
|
@@ -52,7 +52,7 @@ The dataset contains GDPR-related question–answer pairs with paraphrased varia
|
|
| 52 |
|
| 53 |
## Quick Start
|
| 54 |
|
| 55 |
-
python
|
| 56 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 57 |
from peft import PeftModel
|
| 58 |
|
|
@@ -73,7 +73,7 @@ inputs = tokenizer(prompt, return_tensors="pt")
|
|
| 73 |
|
| 74 |
outputs = model.generate(**inputs, max_new_tokens=200)
|
| 75 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 76 |
-
|
| 77 |
|
| 78 |
# Model Card for qwen2_5_lora_grupo3
|
| 79 |
|
|
|
|
| 52 |
|
| 53 |
## Quick Start
|
| 54 |
|
| 55 |
+
```python
|
| 56 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 57 |
from peft import PeftModel
|
| 58 |
|
|
|
|
| 73 |
|
| 74 |
outputs = model.generate(**inputs, max_new_tokens=200)
|
| 75 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 76 |
+
```
|
| 77 |
|
| 78 |
# Model Card for qwen2_5_lora_grupo3
|
| 79 |
|