Instructions to use Dogge/alpaca-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dogge/alpaca-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dogge/alpaca-13b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Dogge/alpaca-13b") model = AutoModelForCausalLM.from_pretrained("Dogge/alpaca-13b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Dogge/alpaca-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dogge/alpaca-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dogge/alpaca-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Dogge/alpaca-13b
- SGLang
How to use Dogge/alpaca-13b 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 "Dogge/alpaca-13b" \ --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": "Dogge/alpaca-13b", "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 "Dogge/alpaca-13b" \ --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": "Dogge/alpaca-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Dogge/alpaca-13b with Docker Model Runner:
docker model run hf.co/Dogge/alpaca-13b
Is this a LORA or full fine tune?
Is this a LORA or full fine tune?
full fine tune with datasets
Thanks, can I ask why the model files are split into so many? And why half are 300mb others 600?
Some weights of the model checkpoint at alpaca-13b were not used when initializing LlamaForCausalLM: ['base_model.model.lm_head.weight']
- This IS expected if you are initializing LlamaForCausalLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing LlamaForCausalLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
ValueError: weight is on the meta device, we need a value to put in on 0.
I get this error, do you happen to know how to fix, using this:
model = LlamaForCausalLM.from_pretrained(
"alpaca",
load_in_8bit=True,
torch_dtype=torch.float16,
device_map="auto"
)
I'm also getting this error with just this model, trying to load it in the text-generation-webui in 8bit
env/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 136, in set_module_tensor_to_device
raise ValueError(f"{tensor_name} is on the meta device, we need a value to put in on {device}.")
ValueError: weight is on the meta device, we need a value to put in on 0.
Don't bother, this model is broken beyond repair, also it's not finetuned, it's LoRA.
Don't bother, this model is broken beyond repair, also it's not finetuned, it's LoRA.
Is there a way to check if a model is LoRA, and more in general to get every possible detail out of it, beyond any doubt? I'm very interested in this
The size is a good indication. I'm sure there are other ways, too.