Text Generation
PEFT
Safetensors
Transformers
lora
soft-prompt
instruction-generation
conversational
Instructions to use Suryanshg/General-DoD-translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Suryanshg/General-DoD-translator with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "Suryanshg/General-DoD-translator") - Transformers
How to use Suryanshg/General-DoD-translator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Suryanshg/General-DoD-translator") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Suryanshg/General-DoD-translator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Suryanshg/General-DoD-translator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Suryanshg/General-DoD-translator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Suryanshg/General-DoD-translator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Suryanshg/General-DoD-translator
- SGLang
How to use Suryanshg/General-DoD-translator 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 "Suryanshg/General-DoD-translator" \ --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": "Suryanshg/General-DoD-translator", "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 "Suryanshg/General-DoD-translator" \ --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": "Suryanshg/General-DoD-translator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Suryanshg/General-DoD-translator with Docker Model Runner:
docker model run hf.co/Suryanshg/General-DoD-translator
Upload PEFT LoRA adapter: General-DoD-translator
Browse files
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 3 |
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
-
license:
|
| 6 |
tags:
|
| 7 |
- lora
|
| 8 |
- peft
|
|
@@ -40,3 +40,9 @@ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
|
|
| 40 |
| Dropout | 0.1 |
|
| 41 |
| Target modules | up_proj, gate_proj, down_proj, q_proj, o_proj, v_proj, k_proj |
|
| 42 |
| PEFT version | 0.18.0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 3 |
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
+
license: llama3.1
|
| 6 |
tags:
|
| 7 |
- lora
|
| 8 |
- peft
|
|
|
|
| 40 |
| Dropout | 0.1 |
|
| 41 |
| Target modules | up_proj, gate_proj, down_proj, q_proj, o_proj, v_proj, k_proj |
|
| 42 |
| PEFT version | 0.18.0 |
|
| 43 |
+
|
| 44 |
+
## License & Attribution
|
| 45 |
+
|
| 46 |
+
Built with Llama.
|
| 47 |
+
|
| 48 |
+
Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
|