Instructions to use pr28416/amicus-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use pr28416/amicus-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0") model = PeftModel.from_pretrained(base_model, "pr28416/amicus-lora") - Transformers
How to use pr28416/amicus-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pr28416/amicus-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pr28416/amicus-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pr28416/amicus-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pr28416/amicus-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pr28416/amicus-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pr28416/amicus-lora
- SGLang
How to use pr28416/amicus-lora 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 "pr28416/amicus-lora" \ --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": "pr28416/amicus-lora", "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 "pr28416/amicus-lora" \ --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": "pr28416/amicus-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pr28416/amicus-lora with Docker Model Runner:
docker model run hf.co/pr28416/amicus-lora
Download checkpoint-57/trainer_state.json from pr28416/amicus-lora: direct link, hf CLI and curl.
- Browser
- Download file 1.83 kB
-
https://huggingface.co/pr28416/amicus-lora/resolve/main/checkpoint-57/trainer_state.json
- Command line
-
hf download hf://pr28416/amicus-lora/checkpoint-57/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/pr28416/amicus-lora/resolve/main/checkpoint-57/trainer_state.json
1.83 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 57, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.17777777777777778, | |
| "grad_norm": 0.5156543850898743, | |
| "learning_rate": 0.00018823529411764707, | |
| "loss": 1.9626, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.35555555555555557, | |
| "grad_norm": 0.9887303709983826, | |
| "learning_rate": 0.00014901960784313728, | |
| "loss": 1.7144, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.5333333333333333, | |
| "grad_norm": 0.8708482980728149, | |
| "learning_rate": 0.00010980392156862746, | |
| "loss": 1.3437, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.7111111111111111, | |
| "grad_norm": 0.5636587142944336, | |
| "learning_rate": 7.058823529411765e-05, | |
| "loss": 1.3288, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.8888888888888888, | |
| "grad_norm": 0.5663055181503296, | |
| "learning_rate": 3.137254901960784e-05, | |
| "loss": 1.2226, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 1.2128527164459229, | |
| "eval_runtime": 16.499, | |
| "eval_samples_per_second": 1.515, | |
| "eval_steps_per_second": 1.515, | |
| "step": 57 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 57, | |
| "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": 1226078506598400.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |