Instructions to use spachava/mini_open_llama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use spachava/mini_open_llama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="spachava/mini_open_llama")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("spachava/mini_open_llama") model = AutoModelForCausalLM.from_pretrained("spachava/mini_open_llama") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use spachava/mini_open_llama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "spachava/mini_open_llama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "spachava/mini_open_llama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/spachava/mini_open_llama
- SGLang
How to use spachava/mini_open_llama 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 "spachava/mini_open_llama" \ --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": "spachava/mini_open_llama", "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 "spachava/mini_open_llama" \ --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": "spachava/mini_open_llama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use spachava/mini_open_llama with Docker Model Runner:
docker model run hf.co/spachava/mini_open_llama
Upload CompressedLlamaForCausalLM
Browse files- config.json +3 -1
- model-00001-of-00003.safetensors +2 -2
- model-00002-of-00003.safetensors +2 -2
- model-00003-of-00003.safetensors +2 -2
- model.safetensors.index.json +6 -9
config.json
CHANGED
|
@@ -19,8 +19,10 @@
|
|
| 19 |
"rms_norm_eps": 1e-06,
|
| 20 |
"rope_scaling": null,
|
| 21 |
"rope_theta": 10000.0,
|
| 22 |
-
"share_layers": "none",
|
| 23 |
"tie_word_embeddings": false,
|
|
|
|
|
|
|
|
|
|
| 24 |
"torch_dtype": "float32",
|
| 25 |
"transformers_version": "4.35.2",
|
| 26 |
"use_cache": true,
|
|
|
|
| 19 |
"rms_norm_eps": 1e-06,
|
| 20 |
"rope_scaling": null,
|
| 21 |
"rope_theta": 10000.0,
|
|
|
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
+
"tied_layers": {
|
| 24 |
+
"1": 0
|
| 25 |
+
},
|
| 26 |
"torch_dtype": "float32",
|
| 27 |
"transformers_version": "4.35.2",
|
| 28 |
"use_cache": true,
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:410627979de4319c4623cd5dbc988483c182d26e893f6d230a6ef6134bd482a7
|
| 3 |
+
size 4923632128
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d81c6fa49d323e616f26b3a824a2f73049c2596008583b13a3d7a38115647a4
|
| 3 |
+
size 4956426376
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c138227dedead48e31613d734e633baf4096b895901d045ef51944dd19c2631
|
| 3 |
+
size 3494086776
|
model.safetensors.index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|
|
@@ -15,9 +15,6 @@
|
|
| 15 |
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 16 |
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 17 |
"model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 18 |
-
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 19 |
-
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 20 |
-
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 21 |
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 22 |
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 23 |
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
|
@@ -106,8 +103,8 @@
|
|
| 106 |
"model.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 107 |
"model.layers.19.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 108 |
"model.layers.19.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 109 |
-
"model.layers.19.mlp.gate_proj.weight": "model-
|
| 110 |
-
"model.layers.19.mlp.up_proj.weight": "model-
|
| 111 |
"model.layers.19.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 112 |
"model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 113 |
"model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
|
@@ -232,11 +229,11 @@
|
|
| 232 |
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 233 |
"model.layers.9.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 234 |
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 235 |
-
"model.layers.9.mlp.gate_proj.weight": "model-
|
| 236 |
-
"model.layers.9.mlp.up_proj.weight": "model-
|
| 237 |
"model.layers.9.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 238 |
"model.layers.9.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 239 |
-
"model.layers.9.self_attn.o_proj.weight": "model-
|
| 240 |
"model.layers.9.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 241 |
"model.layers.9.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 242 |
"model.norm.weight": "model-00003-of-00003.safetensors"
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 13374118400
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|
|
|
|
| 15 |
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 16 |
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 17 |
"model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
|
|
|
|
|
|
|
|
|
| 18 |
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 19 |
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 20 |
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
|
|
|
| 103 |
"model.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 104 |
"model.layers.19.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 105 |
"model.layers.19.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 106 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 107 |
+
"model.layers.19.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 108 |
"model.layers.19.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 109 |
"model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 110 |
"model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
|
|
|
| 229 |
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 230 |
"model.layers.9.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 231 |
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 232 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 233 |
+
"model.layers.9.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 234 |
"model.layers.9.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 235 |
"model.layers.9.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 236 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 237 |
"model.layers.9.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 238 |
"model.layers.9.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 239 |
"model.norm.weight": "model-00003-of-00003.safetensors"
|