Instructions to use harsh762011/lora22 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use harsh762011/lora22 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "harsh762011/lora22") - Transformers
How to use harsh762011/lora22 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="harsh762011/lora22") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("harsh762011/lora22", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use harsh762011/lora22 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "harsh762011/lora22" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "harsh762011/lora22", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/harsh762011/lora22
- SGLang
How to use harsh762011/lora22 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 "harsh762011/lora22" \ --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": "harsh762011/lora22", "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 "harsh762011/lora22" \ --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": "harsh762011/lora22", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use harsh762011/lora22 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for harsh762011/lora22 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for harsh762011/lora22 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for harsh762011/lora22 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="harsh762011/lora22", max_seq_length=2048, ) - Docker Model Runner
How to use harsh762011/lora22 with Docker Model Runner:
docker model run hf.co/harsh762011/lora22
Update LoRA weights
Browse files- README.md +1 -1
- adapter_config.json +9 -5
- continue_lora/adapter_config.json +9 -5
- continue_lora/adapter_model.safetensors +1 -1
README.md
CHANGED
|
@@ -207,4 +207,4 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 207 |
[More Information Needed]
|
| 208 |
### Framework versions
|
| 209 |
|
| 210 |
-
- PEFT 0.
|
|
|
|
| 207 |
[More Information Needed]
|
| 208 |
### Framework versions
|
| 209 |
|
| 210 |
+
- PEFT 0.18.0
|
adapter_config.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"alpha_pattern": {},
|
|
|
|
| 3 |
"auto_mapping": {
|
| 4 |
"base_model_class": "Phi3ForCausalLM",
|
| 5 |
"parent_library": "transformers.models.phi3.modeling_phi3",
|
|
@@ -8,6 +10,7 @@
|
|
| 8 |
"base_model_name_or_path": "unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit",
|
| 9 |
"bias": "none",
|
| 10 |
"corda_config": null,
|
|
|
|
| 11 |
"eva_config": null,
|
| 12 |
"exclude_modules": null,
|
| 13 |
"fan_in_fan_out": false,
|
|
@@ -24,18 +27,19 @@
|
|
| 24 |
"megatron_core": "megatron.core",
|
| 25 |
"modules_to_save": null,
|
| 26 |
"peft_type": "LORA",
|
|
|
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
"r": 16,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"k_proj",
|
| 33 |
-
"gate_proj",
|
| 34 |
-
"up_proj",
|
| 35 |
-
"q_proj",
|
| 36 |
"v_proj",
|
|
|
|
| 37 |
"down_proj",
|
| 38 |
-
"
|
|
|
|
|
|
|
|
|
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 1 |
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
"auto_mapping": {
|
| 6 |
"base_model_class": "Phi3ForCausalLM",
|
| 7 |
"parent_library": "transformers.models.phi3.modeling_phi3",
|
|
|
|
| 10 |
"base_model_name_or_path": "unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
"corda_config": null,
|
| 13 |
+
"ensure_weight_tying": false,
|
| 14 |
"eva_config": null,
|
| 15 |
"exclude_modules": null,
|
| 16 |
"fan_in_fan_out": false,
|
|
|
|
| 27 |
"megatron_core": "megatron.core",
|
| 28 |
"modules_to_save": null,
|
| 29 |
"peft_type": "LORA",
|
| 30 |
+
"peft_version": "0.18.0",
|
| 31 |
"qalora_group_size": 16,
|
| 32 |
"r": 16,
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
"v_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
"down_proj",
|
| 39 |
+
"q_proj",
|
| 40 |
+
"o_proj",
|
| 41 |
+
"gate_proj",
|
| 42 |
+
"k_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
continue_lora/adapter_config.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"alpha_pattern": {},
|
|
|
|
| 3 |
"auto_mapping": {
|
| 4 |
"base_model_class": "Phi3ForCausalLM",
|
| 5 |
"parent_library": "transformers.models.phi3.modeling_phi3",
|
|
@@ -8,6 +10,7 @@
|
|
| 8 |
"base_model_name_or_path": "unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit",
|
| 9 |
"bias": "none",
|
| 10 |
"corda_config": null,
|
|
|
|
| 11 |
"eva_config": null,
|
| 12 |
"exclude_modules": null,
|
| 13 |
"fan_in_fan_out": false,
|
|
@@ -24,18 +27,19 @@
|
|
| 24 |
"megatron_core": "megatron.core",
|
| 25 |
"modules_to_save": null,
|
| 26 |
"peft_type": "LORA",
|
|
|
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
"r": 16,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"k_proj",
|
| 33 |
-
"gate_proj",
|
| 34 |
-
"up_proj",
|
| 35 |
-
"q_proj",
|
| 36 |
"v_proj",
|
|
|
|
| 37 |
"down_proj",
|
| 38 |
-
"
|
|
|
|
|
|
|
|
|
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 1 |
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
"auto_mapping": {
|
| 6 |
"base_model_class": "Phi3ForCausalLM",
|
| 7 |
"parent_library": "transformers.models.phi3.modeling_phi3",
|
|
|
|
| 10 |
"base_model_name_or_path": "unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
"corda_config": null,
|
| 13 |
+
"ensure_weight_tying": false,
|
| 14 |
"eva_config": null,
|
| 15 |
"exclude_modules": null,
|
| 16 |
"fan_in_fan_out": false,
|
|
|
|
| 27 |
"megatron_core": "megatron.core",
|
| 28 |
"modules_to_save": null,
|
| 29 |
"peft_type": "LORA",
|
| 30 |
+
"peft_version": "0.18.0",
|
| 31 |
"qalora_group_size": 16,
|
| 32 |
"r": 16,
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
"v_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
"down_proj",
|
| 39 |
+
"q_proj",
|
| 40 |
+
"o_proj",
|
| 41 |
+
"gate_proj",
|
| 42 |
+
"k_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
continue_lora/adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2493649752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91b58581317cf3afceb4edeee9f48250b3b48d3ada0c85ce32d840a1d9757340
|
| 3 |
size 2493649752
|