Instructions to use tharun2909/disligpt_FT_adapter_new1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tharun2909/disligpt_FT_adapter_new1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("distilbert/distilgpt2") model = PeftModel.from_pretrained(base_model, "tharun2909/disligpt_FT_adapter_new1") - Transformers
How to use tharun2909/disligpt_FT_adapter_new1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tharun2909/disligpt_FT_adapter_new1")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tharun2909/disligpt_FT_adapter_new1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tharun2909/disligpt_FT_adapter_new1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tharun2909/disligpt_FT_adapter_new1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tharun2909/disligpt_FT_adapter_new1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tharun2909/disligpt_FT_adapter_new1
- SGLang
How to use tharun2909/disligpt_FT_adapter_new1 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 "tharun2909/disligpt_FT_adapter_new1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tharun2909/disligpt_FT_adapter_new1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "tharun2909/disligpt_FT_adapter_new1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tharun2909/disligpt_FT_adapter_new1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tharun2909/disligpt_FT_adapter_new1 with Docker Model Runner:
docker model run hf.co/tharun2909/disligpt_FT_adapter_new1
second commit
Browse files- adapter_config.json +3 -3
adapter_config.json
CHANGED
|
@@ -23,14 +23,14 @@
|
|
| 23 |
"megatron_core": "megatron.core",
|
| 24 |
"modules_to_save": null,
|
| 25 |
"peft_type": "LORA",
|
| 26 |
-
"peft_version": "0.18.
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
"r": 4,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
],
|
| 35 |
"target_parameters": null,
|
| 36 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 23 |
"megatron_core": "megatron.core",
|
| 24 |
"modules_to_save": null,
|
| 25 |
"peft_type": "LORA",
|
| 26 |
+
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
"r": 4,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
+
"c_attn",
|
| 33 |
+
"c_proj"
|
| 34 |
],
|
| 35 |
"target_parameters": null,
|
| 36 |
"task_type": "CAUSAL_LM",
|