Instructions to use hssling/cardioai-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hssling/cardioai-adapter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-VL-2B-Instruct") model = PeftModel.from_pretrained(base_model, "hssling/cardioai-adapter") - Transformers
How to use hssling/cardioai-adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hssling/cardioai-adapter") 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("hssling/cardioai-adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hssling/cardioai-adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hssling/cardioai-adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hssling/cardioai-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hssling/cardioai-adapter
- SGLang
How to use hssling/cardioai-adapter 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 "hssling/cardioai-adapter" \ --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": "hssling/cardioai-adapter", "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 "hssling/cardioai-adapter" \ --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": "hssling/cardioai-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hssling/cardioai-adapter with Docker Model Runner:
docker model run hf.co/hssling/cardioai-adapter
Download checkpoint-375/trainer_state.json from hssling/cardioai-adapter: direct link, hf CLI and curl.
- Browser
- Download file 4.01 kB
-
https://huggingface.co/hssling/cardioai-adapter/resolve/main/checkpoint-375/trainer_state.json
- Command line
-
hf download hf://hssling/cardioai-adapter/checkpoint-375/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/hssling/cardioai-adapter/resolve/main/checkpoint-375/trainer_state.json
4.01 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 375, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.05333333333333334, | |
| "grad_norm": 0.09229224175214767, | |
| "learning_rate": 0.00019546666666666668, | |
| "loss": 7.443636322021485, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.10666666666666667, | |
| "grad_norm": 0.03113839030265808, | |
| "learning_rate": 0.00019013333333333334, | |
| "loss": 4.766106414794922, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.16, | |
| "grad_norm": 0.023965956643223763, | |
| "learning_rate": 0.00018480000000000002, | |
| "loss": 4.672945022583008, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.21333333333333335, | |
| "grad_norm": 0.04270876571536064, | |
| "learning_rate": 0.00017946666666666667, | |
| "loss": 4.6693061828613285, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.26666666666666666, | |
| "grad_norm": 0.007624867372214794, | |
| "learning_rate": 0.00017413333333333336, | |
| "loss": 4.666190338134766, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.32, | |
| "grad_norm": 0.005640557501465082, | |
| "learning_rate": 0.0001688, | |
| "loss": 4.658547973632812, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.37333333333333335, | |
| "grad_norm": 0.005010648630559444, | |
| "learning_rate": 0.0001634666666666667, | |
| "loss": 4.665555191040039, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.4266666666666667, | |
| "grad_norm": 0.010227741673588753, | |
| "learning_rate": 0.00015813333333333335, | |
| "loss": 4.662850952148437, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.48, | |
| "grad_norm": 0.027864055708050728, | |
| "learning_rate": 0.0001528, | |
| "loss": 4.663832473754883, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.5333333333333333, | |
| "grad_norm": 0.005860226694494486, | |
| "learning_rate": 0.00014746666666666666, | |
| "loss": 4.6652687072753904, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.5866666666666667, | |
| "grad_norm": 0.004596560262143612, | |
| "learning_rate": 0.00014213333333333334, | |
| "loss": 4.672823333740235, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.64, | |
| "grad_norm": 0.00873731728643179, | |
| "learning_rate": 0.00013680000000000002, | |
| "loss": 4.66284065246582, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.6933333333333334, | |
| "grad_norm": 0.01795760542154312, | |
| "learning_rate": 0.00013146666666666667, | |
| "loss": 4.663800430297852, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.7466666666666667, | |
| "grad_norm": 0.017787013202905655, | |
| "learning_rate": 0.00012613333333333335, | |
| "loss": 4.658986282348633, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.8, | |
| "grad_norm": 0.037507686764001846, | |
| "learning_rate": 0.0001208, | |
| "loss": 4.65656852722168, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.8533333333333334, | |
| "grad_norm": 0.015351720154285431, | |
| "learning_rate": 0.00011546666666666668, | |
| "loss": 4.6595008850097654, | |
| "step": 320 | |
| }, | |
| { | |
| "epoch": 0.9066666666666666, | |
| "grad_norm": 0.012529321946203709, | |
| "learning_rate": 0.00011013333333333333, | |
| "loss": 4.6615745544433596, | |
| "step": 340 | |
| }, | |
| { | |
| "epoch": 0.96, | |
| "grad_norm": 0.01247857604175806, | |
| "learning_rate": 0.00010480000000000001, | |
| "loss": 4.665129089355469, | |
| "step": 360 | |
| } | |
| ], | |
| "logging_steps": 20, | |
| "max_steps": 750, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 5036654810750976.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |