Instructions to use Technotech/RedPajama-Base-3B-4bit-128g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Technotech/RedPajama-Base-3B-4bit-128g with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Technotech/RedPajama-Base-3B-4bit-128g")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Technotech/RedPajama-Base-3B-4bit-128g") model = AutoModelForCausalLM.from_pretrained("Technotech/RedPajama-Base-3B-4bit-128g") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Technotech/RedPajama-Base-3B-4bit-128g with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Technotech/RedPajama-Base-3B-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": "Technotech/RedPajama-Base-3B-4bit-128g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Technotech/RedPajama-Base-3B-4bit-128g
- SGLang
How to use Technotech/RedPajama-Base-3B-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 "Technotech/RedPajama-Base-3B-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": "Technotech/RedPajama-Base-3B-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 "Technotech/RedPajama-Base-3B-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": "Technotech/RedPajama-Base-3B-4bit-128g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Technotech/RedPajama-Base-3B-4bit-128g with Docker Model Runner:
docker model run hf.co/Technotech/RedPajama-Base-3B-4bit-128g
Commit ·
bf7aa2b
1
Parent(s): d50d127
AutoGPTQ model for togethercomputer/RedPajama-INCITE-Base-3B-v1: 4bits, gr128, desc_act=False
Browse files- config.json +26 -0
- gptq_model-4bit-128g.safetensors +3 -0
- quantize_config.json +10 -0
config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "togethercomputer/RedPajama-INCITE-Base-3B-v1",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"GPTNeoXForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 0,
|
| 7 |
+
"classifier_dropout": 0.1,
|
| 8 |
+
"eos_token_id": 0,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_size": 2560,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 10240,
|
| 13 |
+
"layer_norm_eps": 1e-05,
|
| 14 |
+
"max_position_embeddings": 2048,
|
| 15 |
+
"model_type": "gpt_neox",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
+
"rotary_emb_base": 10000,
|
| 19 |
+
"rotary_pct": 1.0,
|
| 20 |
+
"tie_word_embeddings": false,
|
| 21 |
+
"torch_dtype": "float16",
|
| 22 |
+
"transformers_version": "4.29.2",
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"use_parallel_residual": false,
|
| 25 |
+
"vocab_size": 50432
|
| 26 |
+
}
|
gptq_model-4bit-128g.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:680d50004d5525c8134f20165007aa21fd3c65843891c202afd288c349bb1064
|
| 3 |
+
size 1962625112
|
quantize_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bits": 4,
|
| 3 |
+
"group_size": 128,
|
| 4 |
+
"damp_percent": 0.01,
|
| 5 |
+
"desc_act": false,
|
| 6 |
+
"sym": true,
|
| 7 |
+
"true_sequential": true,
|
| 8 |
+
"model_name_or_path": null,
|
| 9 |
+
"model_file_base_name": null
|
| 10 |
+
}
|