Instructions to use ccncio/trinity-lora-weights with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ccncio/trinity-lora-weights with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/mistral-7b-v0.3") model = PeftModel.from_pretrained(base_model, "ccncio/trinity-lora-weights") - Transformers
How to use ccncio/trinity-lora-weights with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccncio/trinity-lora-weights")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ccncio/trinity-lora-weights", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ccncio/trinity-lora-weights with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccncio/trinity-lora-weights" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccncio/trinity-lora-weights", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ccncio/trinity-lora-weights
- SGLang
How to use ccncio/trinity-lora-weights 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 "ccncio/trinity-lora-weights" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccncio/trinity-lora-weights", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ccncio/trinity-lora-weights" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccncio/trinity-lora-weights", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ccncio/trinity-lora-weights with Docker Model Runner:
docker model run hf.co/ccncio/trinity-lora-weights
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 125, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.08, | |
| "grad_norm": 2.4951331615448, | |
| "learning_rate": 0.00019173553719008265, | |
| "loss": 2.2136287689208984, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.16, | |
| "grad_norm": 1.1572011709213257, | |
| "learning_rate": 0.00017520661157024794, | |
| "loss": 0.41205081939697263, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.24, | |
| "grad_norm": 0.7024247050285339, | |
| "learning_rate": 0.00015867768595041322, | |
| "loss": 0.3598937034606934, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.32, | |
| "grad_norm": 0.5871134400367737, | |
| "learning_rate": 0.0001421487603305785, | |
| "loss": 0.3458528995513916, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.4, | |
| "grad_norm": 0.4141485095024109, | |
| "learning_rate": 0.00012561983471074382, | |
| "loss": 0.339448070526123, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.48, | |
| "grad_norm": 0.39055025577545166, | |
| "learning_rate": 0.00010909090909090909, | |
| "loss": 0.33486232757568357, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.56, | |
| "grad_norm": 0.47050267457962036, | |
| "learning_rate": 9.256198347107439e-05, | |
| "loss": 0.3365666627883911, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.64, | |
| "grad_norm": 0.27707022428512573, | |
| "learning_rate": 7.603305785123968e-05, | |
| "loss": 0.33119356632232666, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.72, | |
| "grad_norm": 0.29412567615509033, | |
| "learning_rate": 5.950413223140496e-05, | |
| "loss": 0.3355336904525757, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.8, | |
| "grad_norm": 0.311093270778656, | |
| "learning_rate": 4.2975206611570254e-05, | |
| "loss": 0.33365061283111574, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.88, | |
| "grad_norm": 0.22891905903816223, | |
| "learning_rate": 2.644628099173554e-05, | |
| "loss": 0.33002266883850095, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.96, | |
| "grad_norm": 0.24521638453006744, | |
| "learning_rate": 9.917355371900826e-06, | |
| "loss": 0.3309016704559326, | |
| "step": 120 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 125, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 5111179675582464.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |