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
File size: 2,299 Bytes
4a91640 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | {
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 0.08,
"eval_steps": 500,
"global_step": 10,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.008,
"grad_norm": 7.379425525665283,
"learning_rate": 0.0,
"loss": 4.016258239746094,
"step": 1
},
{
"epoch": 0.016,
"grad_norm": 8.28126335144043,
"learning_rate": 4e-05,
"loss": 4.1329755783081055,
"step": 2
},
{
"epoch": 0.024,
"grad_norm": 5.840158939361572,
"learning_rate": 8e-05,
"loss": 3.7547378540039062,
"step": 3
},
{
"epoch": 0.032,
"grad_norm": 6.3198065757751465,
"learning_rate": 0.00012,
"loss": 3.216219902038574,
"step": 4
},
{
"epoch": 0.04,
"grad_norm": 12.44980239868164,
"learning_rate": 0.00016,
"loss": 2.5023694038391113,
"step": 5
},
{
"epoch": 0.048,
"grad_norm": 5.22922945022583,
"learning_rate": 0.0002,
"loss": 1.930384874343872,
"step": 6
},
{
"epoch": 0.056,
"grad_norm": 14.052867889404297,
"learning_rate": 0.00016,
"loss": 1.3705148696899414,
"step": 7
},
{
"epoch": 0.064,
"grad_norm": 5.280429363250732,
"learning_rate": 0.00012,
"loss": 1.0065242052078247,
"step": 8
},
{
"epoch": 0.072,
"grad_norm": 2.942521333694458,
"learning_rate": 8e-05,
"loss": 0.7536088228225708,
"step": 9
},
{
"epoch": 0.08,
"grad_norm": 2.898214817047119,
"learning_rate": 4e-05,
"loss": 0.6234063506126404,
"step": 10
}
],
"logging_steps": 1,
"max_steps": 10,
"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": 405816829575168.0,
"train_batch_size": 2,
"trial_name": null,
"trial_params": null
}
|