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
Invalid JSON:Unexpected token 'N', ..."entropy": NaN,
"... is not valid JSON
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 13, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": NaN, | |
| "epoch": 0.8, | |
| "grad_norm": NaN, | |
| "learning_rate": 6.153846153846155e-05, | |
| "loss": 227132466790.4, | |
| "mean_token_accuracy": 0.03992476332932711, | |
| "num_tokens": 7590.0, | |
| "step": 10 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 13, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 200, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 20974296111360.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |