Instructions to use anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g") model = AutoModelForCausalLM.from_pretrained("anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g
- SGLang
How to use anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g 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 "anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g" \ --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": "anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g", "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 "anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g" \ --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": "anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g with Docker Model Runner:
docker model run hf.co/anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g
Commit ·
4ef20dd
1
Parent(s): 2de81a2
added ggml quantization for cuda model
Browse files
ggml_README.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The model is for: https://github.com/ggerganov/llama.cpp
|
| 2 |
+
|
| 3 |
+
Date: 2023-04-01
|
| 4 |
+
ggml model file magic: 0x67676a74 (ggjt in hex)
|
| 5 |
+
ggml model file version: 1
|
| 6 |
+
|
| 7 |
+
Torrent contents:
|
| 8 |
+
The fine tune described at https://huggingface.co/chavinlo/gpt4-x-alpaca converted to ggml format from https://huggingface.co/anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g/blob/f267949dcd5a5e6451933cec3d0b5661f4f9c889/gpt-x-alpaca-13b-native-4bit-128g-cuda.pt
|
| 9 |
+
Details about the GPTQ quantization process: https://huggingface.co/anon8231489123/gpt4-x-alpaca-13b-native-4bit-128g/blob/f267949dcd5a5e6451933cec3d0b5661f4f9c889/README.md
|
| 10 |
+
|
| 11 |
+
Tools used:
|
| 12 |
+
[1] Conversion to ggml: https://github.com/ggerganov/llama.cpp/blob/3265b102beb7674d010644ca2a1bd30a58f9f6b5/convert.py and [2]
|
| 13 |
+
[2] Added extra tokens: https://huggingface.co/chavinlo/alpaca-13b/blob/464a0bd1ec16f3a7d5295a0035aff87f307e62f1/added_tokens.json
|
| 14 |
+
[3] Migration to the latest llama.cpp model format: https://github.com/ggerganov/llama.cpp/blob/3525899277d2e2bdc8ec3f0e6e40c47251608700/migrate-ggml-2023-03-30-pr613.py
|
| 15 |
+
|
gpt4-x-alpaca-13b-ggml-q4_1-from-gptq-4bit-128g/ggml-model-q4_1.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4a640a1ce33009c244a361c6f87733aacbc2bea90e84d3c304a4c8be2bdf22d
|
| 3 |
+
size 10173322368
|