Instructions to use asparius/Qwen2.5-7B-LORA-SDF-epoch3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use asparius/Qwen2.5-7B-LORA-SDF-epoch3 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B") model = PeftModel.from_pretrained(base_model, "asparius/Qwen2.5-7B-LORA-SDF-epoch3") - Transformers
How to use asparius/Qwen2.5-7B-LORA-SDF-epoch3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="asparius/Qwen2.5-7B-LORA-SDF-epoch3") 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("asparius/Qwen2.5-7B-LORA-SDF-epoch3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use asparius/Qwen2.5-7B-LORA-SDF-epoch3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "asparius/Qwen2.5-7B-LORA-SDF-epoch3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asparius/Qwen2.5-7B-LORA-SDF-epoch3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/asparius/Qwen2.5-7B-LORA-SDF-epoch3
- SGLang
How to use asparius/Qwen2.5-7B-LORA-SDF-epoch3 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 "asparius/Qwen2.5-7B-LORA-SDF-epoch3" \ --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": "asparius/Qwen2.5-7B-LORA-SDF-epoch3", "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 "asparius/Qwen2.5-7B-LORA-SDF-epoch3" \ --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": "asparius/Qwen2.5-7B-LORA-SDF-epoch3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use asparius/Qwen2.5-7B-LORA-SDF-epoch3 with Docker Model Runner:
docker model run hf.co/asparius/Qwen2.5-7B-LORA-SDF-epoch3
Upload folder using huggingface_hub
Browse files- README.md +3 -3
- adapter_config.json +7 -6
- adapter_model.safetensors +1 -1
- chat_template.jinja +2 -2
- tokenizer_config.json +1 -1
README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: Qwen/Qwen2.5-7B
|
| 3 |
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
-
- base_model:adapter:Qwen/Qwen2.5-7B
|
| 7 |
- lora
|
| 8 |
- sft
|
| 9 |
- transformers
|
|
@@ -206,4 +206,4 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 206 |
[More Information Needed]
|
| 207 |
### Framework versions
|
| 208 |
|
| 209 |
-
- PEFT 0.
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-Coder-7B
|
| 3 |
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
+
- base_model:adapter:Qwen/Qwen2.5-Coder-7B
|
| 7 |
- lora
|
| 8 |
- sft
|
| 9 |
- transformers
|
|
|
|
| 206 |
[More Information Needed]
|
| 207 |
### Framework versions
|
| 208 |
|
| 209 |
+
- PEFT 0.21.0
|
adapter_config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"alpha_pattern": {},
|
| 4 |
"arrow_config": null,
|
| 5 |
"auto_mapping": null,
|
| 6 |
-
"base_model_name_or_path": "Qwen/Qwen2.5-7B",
|
| 7 |
"bias": "none",
|
| 8 |
"corda_config": null,
|
| 9 |
"ensure_weight_tying": false,
|
|
@@ -12,6 +12,7 @@
|
|
| 12 |
"fan_in_fan_out": false,
|
| 13 |
"inference_mode": true,
|
| 14 |
"init_lora_weights": true,
|
|
|
|
| 15 |
"layer_replication": null,
|
| 16 |
"layers_pattern": null,
|
| 17 |
"layers_to_transform": null,
|
|
@@ -25,19 +26,19 @@
|
|
| 25 |
"modules_to_save": null,
|
| 26 |
"monteclora_config": null,
|
| 27 |
"peft_type": "LORA",
|
| 28 |
-
"peft_version": "0.
|
| 29 |
"qalora_group_size": 16,
|
| 30 |
"r": 32,
|
| 31 |
"rank_pattern": {},
|
| 32 |
"revision": null,
|
| 33 |
"target_modules": [
|
| 34 |
"o_proj",
|
|
|
|
|
|
|
| 35 |
"up_proj",
|
|
|
|
| 36 |
"v_proj",
|
| 37 |
-
"
|
| 38 |
-
"down_proj",
|
| 39 |
-
"q_proj",
|
| 40 |
-
"k_proj"
|
| 41 |
],
|
| 42 |
"target_parameters": null,
|
| 43 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 3 |
"alpha_pattern": {},
|
| 4 |
"arrow_config": null,
|
| 5 |
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen2.5-Coder-7B",
|
| 7 |
"bias": "none",
|
| 8 |
"corda_config": null,
|
| 9 |
"ensure_weight_tying": false,
|
|
|
|
| 12 |
"fan_in_fan_out": false,
|
| 13 |
"inference_mode": true,
|
| 14 |
"init_lora_weights": true,
|
| 15 |
+
"kasa_config": null,
|
| 16 |
"layer_replication": null,
|
| 17 |
"layers_pattern": null,
|
| 18 |
"layers_to_transform": null,
|
|
|
|
| 26 |
"modules_to_save": null,
|
| 27 |
"monteclora_config": null,
|
| 28 |
"peft_type": "LORA",
|
| 29 |
+
"peft_version": "0.21.0",
|
| 30 |
"qalora_group_size": 16,
|
| 31 |
"r": 32,
|
| 32 |
"rank_pattern": {},
|
| 33 |
"revision": null,
|
| 34 |
"target_modules": [
|
| 35 |
"o_proj",
|
| 36 |
+
"q_proj",
|
| 37 |
+
"gate_proj",
|
| 38 |
"up_proj",
|
| 39 |
+
"k_proj",
|
| 40 |
"v_proj",
|
| 41 |
+
"down_proj"
|
|
|
|
|
|
|
|
|
|
| 42 |
],
|
| 43 |
"target_parameters": null,
|
| 44 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 161533584
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68a52e7755de93e8c4b7918c9b208b2e8bac6ea2e2834dc00185ea8ead793932
|
| 3 |
size 161533584
|
chat_template.jinja
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
{{- messages[0]['content'] }}
|
| 5 |
{%- else %}
|
| 6 |
-
{{- 'You are a helpful assistant.' }}
|
| 7 |
{%- endif %}
|
| 8 |
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
{%- for tool in tools %}
|
|
@@ -15,7 +15,7 @@
|
|
| 15 |
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
{%- else %}
|
| 18 |
-
{{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
{%- endif %}
|
| 20 |
{%- endif %}
|
| 21 |
{%- for message in messages %}
|
|
|
|
| 3 |
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
{{- messages[0]['content'] }}
|
| 5 |
{%- else %}
|
| 6 |
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
| 7 |
{%- endif %}
|
| 8 |
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
{%- for tool in tools %}
|
|
|
|
| 15 |
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
{%- endif %}
|
| 20 |
{%- endif %}
|
| 21 |
{%- for message in messages %}
|
tokenizer_config.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
"is_local": false,
|
| 24 |
-
"model_max_length":
|
| 25 |
"pad_token": "<|endoftext|>",
|
| 26 |
"split_special_tokens": false,
|
| 27 |
"tokenizer_class": "Qwen2Tokenizer",
|
|
|
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
"is_local": false,
|
| 24 |
+
"model_max_length": 32768,
|
| 25 |
"pad_token": "<|endoftext|>",
|
| 26 |
"split_special_tokens": false,
|
| 27 |
"tokenizer_class": "Qwen2Tokenizer",
|