Instructions to use medalpaca/medalpaca-lora-7b-16bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use medalpaca/medalpaca-lora-7b-16bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="medalpaca/medalpaca-lora-7b-16bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("medalpaca/medalpaca-lora-7b-16bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use medalpaca/medalpaca-lora-7b-16bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "medalpaca/medalpaca-lora-7b-16bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "medalpaca/medalpaca-lora-7b-16bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/medalpaca/medalpaca-lora-7b-16bit
- SGLang
How to use medalpaca/medalpaca-lora-7b-16bit 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 "medalpaca/medalpaca-lora-7b-16bit" \ --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": "medalpaca/medalpaca-lora-7b-16bit", "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 "medalpaca/medalpaca-lora-7b-16bit" \ --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": "medalpaca/medalpaca-lora-7b-16bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use medalpaca/medalpaca-lora-7b-16bit with Docker Model Runner:
docker model run hf.co/medalpaca/medalpaca-lora-7b-16bit
add model weights, trained with datav3
Browse files- adapter_config.json +18 -0
- adapter_model.bin +3 -0
adapter_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model_name_or_path": "decapoda-research/llama-7b-hf",
|
| 3 |
+
"bias": "none",
|
| 4 |
+
"enable_lora": null,
|
| 5 |
+
"fan_in_fan_out": false,
|
| 6 |
+
"inference_mode": true,
|
| 7 |
+
"lora_alpha": 16,
|
| 8 |
+
"lora_dropout": 0.1,
|
| 9 |
+
"merge_weights": false,
|
| 10 |
+
"modules_to_save": null,
|
| 11 |
+
"peft_type": "LORA",
|
| 12 |
+
"r": 8,
|
| 13 |
+
"target_modules": [
|
| 14 |
+
"q_proj",
|
| 15 |
+
"v_proj"
|
| 16 |
+
],
|
| 17 |
+
"task_type": "CAUSAL_LM"
|
| 18 |
+
}
|
adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f11fad76627fb831a742e478583d6d09506434b35efa13dc5c1e5edeee10f06c
|
| 3 |
+
size 16822989
|