Instructions to use DevHunterAI/cad-lora-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use DevHunterAI/cad-lora-v1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "DevHunterAI/cad-lora-v1") - Transformers
How to use DevHunterAI/cad-lora-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DevHunterAI/cad-lora-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("DevHunterAI/cad-lora-v1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DevHunterAI/cad-lora-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DevHunterAI/cad-lora-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DevHunterAI/cad-lora-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DevHunterAI/cad-lora-v1
- SGLang
How to use DevHunterAI/cad-lora-v1 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 "DevHunterAI/cad-lora-v1" \ --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": "DevHunterAI/cad-lora-v1", "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 "DevHunterAI/cad-lora-v1" \ --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": "DevHunterAI/cad-lora-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DevHunterAI/cad-lora-v1 with Docker Model Runner:
docker model run hf.co/DevHunterAI/cad-lora-v1
CAD LoRA adapter upload
Browse files- adapter_config.json +1 -1
- adapter_model.safetensors +1 -1
- checkpoint-4/adapter_config.json +1 -1
- checkpoint-4/adapter_model.safetensors +1 -1
- checkpoint-4/optimizer.pt +1 -1
- checkpoint-4/rng_state.pth +1 -1
- checkpoint-4/trainer_state.json +1 -1
- checkpoint-6/adapter_config.json +1 -1
- checkpoint-6/adapter_model.safetensors +1 -1
- checkpoint-6/optimizer.pt +1 -1
- checkpoint-6/rng_state.pth +1 -1
- checkpoint-6/trainer_state.json +7 -7
adapter_config.json
CHANGED
|
@@ -29,8 +29,8 @@
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"v_proj",
|
| 33 |
"up_proj",
|
|
|
|
| 34 |
"q_proj"
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
|
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
| 32 |
"up_proj",
|
| 33 |
+
"v_proj",
|
| 34 |
"q_proj"
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 27547336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc2cc7257ebd4cd73b1c7374f391dec191015c425a9ceb4f9259c8a8c281de02
|
| 3 |
size 27547336
|
checkpoint-4/adapter_config.json
CHANGED
|
@@ -29,8 +29,8 @@
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"v_proj",
|
| 33 |
"up_proj",
|
|
|
|
| 34 |
"q_proj"
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
|
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
| 32 |
"up_proj",
|
| 33 |
+
"v_proj",
|
| 34 |
"q_proj"
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
checkpoint-4/adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 27547336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0068bbb55640de2e6a5b9788ef78a9c2038a60b87b2fc8904c9796b39f20580b
|
| 3 |
size 27547336
|
checkpoint-4/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 55191482
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7ee1202bdb7b019ea0256bc1aee85ac3b1eaea14b844e1abfb9813b37ad6cbb
|
| 3 |
size 55191482
|
checkpoint-4/rng_state.pth
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 14244
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0c40c4a81f200aad10927b2fb78e549faf5e14be0b5d66b8ffdc58cd6eaa7bf
|
| 3 |
size 14244
|
checkpoint-4/trainer_state.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
| 26 |
"attributes": {}
|
| 27 |
}
|
| 28 |
},
|
| 29 |
-
"total_flos":
|
| 30 |
"train_batch_size": 1,
|
| 31 |
"trial_name": null,
|
| 32 |
"trial_params": null
|
|
|
|
| 26 |
"attributes": {}
|
| 27 |
}
|
| 28 |
},
|
| 29 |
+
"total_flos": 145326456459264.0,
|
| 30 |
"train_batch_size": 1,
|
| 31 |
"trial_name": null,
|
| 32 |
"trial_params": null
|
checkpoint-6/adapter_config.json
CHANGED
|
@@ -29,8 +29,8 @@
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"v_proj",
|
| 33 |
"up_proj",
|
|
|
|
| 34 |
"q_proj"
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
|
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
| 32 |
"up_proj",
|
| 33 |
+
"v_proj",
|
| 34 |
"q_proj"
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
checkpoint-6/adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 27547336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc2cc7257ebd4cd73b1c7374f391dec191015c425a9ceb4f9259c8a8c281de02
|
| 3 |
size 27547336
|
checkpoint-6/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 55191482
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb00c6a6c62ff7d7a6ec09215d12e3313b68eb6f4cb014a8d3cf884e8e11cdd2
|
| 3 |
size 55191482
|
checkpoint-6/rng_state.pth
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 14244
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64123b336e44c6cf78b63f66127ecea6f20a681e01f9223d7d4f5ef02fd154ce
|
| 3 |
size 14244
|
checkpoint-6/trainer_state.json
CHANGED
|
@@ -10,13 +10,13 @@
|
|
| 10 |
"is_world_process_zero": true,
|
| 11 |
"log_history": [
|
| 12 |
{
|
| 13 |
-
"entropy": 0.
|
| 14 |
-
"epoch": 2.
|
| 15 |
-
"grad_norm": 0.
|
| 16 |
"learning_rate": 6.909830056250527e-05,
|
| 17 |
-
"loss": 1.
|
| 18 |
-
"mean_token_accuracy": 0.
|
| 19 |
-
"num_tokens":
|
| 20 |
"step": 5
|
| 21 |
}
|
| 22 |
],
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
"attributes": {}
|
| 38 |
}
|
| 39 |
},
|
| 40 |
-
"total_flos":
|
| 41 |
"train_batch_size": 1,
|
| 42 |
"trial_name": null,
|
| 43 |
"trial_params": null
|
|
|
|
| 10 |
"is_world_process_zero": true,
|
| 11 |
"log_history": [
|
| 12 |
{
|
| 13 |
+
"entropy": 0.8723009686384883,
|
| 14 |
+
"epoch": 2.8,
|
| 15 |
+
"grad_norm": 0.6077917814254761,
|
| 16 |
"learning_rate": 6.909830056250527e-05,
|
| 17 |
+
"loss": 1.339169979095459,
|
| 18 |
+
"mean_token_accuracy": 0.7311233420457158,
|
| 19 |
+
"num_tokens": 25846.0,
|
| 20 |
"step": 5
|
| 21 |
}
|
| 22 |
],
|
|
|
|
| 37 |
"attributes": {}
|
| 38 |
}
|
| 39 |
},
|
| 40 |
+
"total_flos": 217989684688896.0,
|
| 41 |
"train_batch_size": 1,
|
| 42 |
"trial_name": null,
|
| 43 |
"trial_params": null
|