Instructions to use Aeala/GPT4-x-Alpasta-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aeala/GPT4-x-Alpasta-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Aeala/GPT4-x-Alpasta-13b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Aeala/GPT4-x-Alpasta-13b") model = AutoModelForCausalLM.from_pretrained("Aeala/GPT4-x-Alpasta-13b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Aeala/GPT4-x-Alpasta-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aeala/GPT4-x-Alpasta-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aeala/GPT4-x-Alpasta-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Aeala/GPT4-x-Alpasta-13b
- SGLang
How to use Aeala/GPT4-x-Alpasta-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 "Aeala/GPT4-x-Alpasta-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": "Aeala/GPT4-x-Alpasta-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 "Aeala/GPT4-x-Alpasta-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": "Aeala/GPT4-x-Alpasta-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Aeala/GPT4-x-Alpasta-13b with Docker Model Runner:
docker model run hf.co/Aeala/GPT4-x-Alpasta-13b
How to use the quantized weights?
I tried to load the quantized weights on oobabooga's text-generation-webui but an error was occured. I downloaded the weights using download-model.py comes with oobabooga's webui. How can I load this weights?
I found that pytorch_model-00001-of-0000?.bin files are not found. Should I download those files?
If pytorch_model.bin.index.json needs to be edited, please let me know how to do, because this file has 410 lines, I guess just substituting with 4bit-128g.safetensors or 4bit.safetensors will not work.
INFO:Loading Aeala_GPT4-x-Alpasta-13b...
Loading checkpoint shards: 0%| | 0/3 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/transformers/modeling_utils.py", line 442, in load_state_dict
return torch.load(checkpoint_file, map_location="cpu")
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/torch/serialization.py", line 862, in load
with _open_file_like(f, 'rb') as opened_file:
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/torch/serialization.py", line 321, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/torch/serialization.py", line 302, in __init__
super().__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'models/Aeala_GPT4-x-Alpasta-13b/pytorch_model-00001-of-00003.bin'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/text-generation-webui/server.py", line 948, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/text-generation-webui/modules/models.py", line 85, in load_model
model = LoaderClass.from_pretrained(Path(f"{shared.args.model_dir}/{model_name}"), low_cpu_mem_usage=True, torch_dtype=torch.bfloat16 if shared.args.bf16 else torch.float16, trust_remote_code=trust_remote_code)
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 471, in from_pretrained
return model_class.from_pretrained(
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2795, in from_pretrained
) = cls._load_pretrained_model(
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3109, in _load_pretrained_model
state_dict = load_state_dict(shard_file)
File "/Volumes/cuttingedges/large_lang_models/oobabooga_macos/installer_files/env/lib/python3.10/site-packages/transformers/modeling_utils.py", line 445, in load_state_dict
with open(checkpoint_file) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'models/Aeala_GPT4-x-Alpasta-13b/pytorch_model-00001-of-00003.bin'
Hi! Thanks for using this ^~^ -- odd, I think that webui likes to have the models named the same as the folder (or if the folder name has something like -4bit-128g at the end? Did you try running with the --wbits 4 and such?). Try renaming the one you'd like to use to something like: GPT4-x-Alpasta-13b-4bit.safetensors (or 4bit-128g if you want to use that!) And it should load! If not, let me know and I'd be happy to help further ^~^ good luck!!