Instructions to use w-ahmad/4M-ACT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use w-ahmad/4M-ACT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="w-ahmad/4M-ACT")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("w-ahmad/4M-ACT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use w-ahmad/4M-ACT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "w-ahmad/4M-ACT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "w-ahmad/4M-ACT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/w-ahmad/4M-ACT
- SGLang
How to use w-ahmad/4M-ACT 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 "w-ahmad/4M-ACT" \ --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": "w-ahmad/4M-ACT", "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 "w-ahmad/4M-ACT" \ --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": "w-ahmad/4M-ACT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use w-ahmad/4M-ACT with Docker Model Runner:
docker model run hf.co/w-ahmad/4M-ACT
Training in progress, step 2000
Browse files- config.json +1 -1
- model.safetensors +1 -1
- training_args.bin +1 -1
- training_log.jsonl +2 -2
config.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
| 18 |
"mlp_type": "glu",
|
| 19 |
"model_type": "tiny_llama",
|
| 20 |
"num_attention_heads": 4,
|
| 21 |
-
"num_hidden_layers":
|
| 22 |
"num_key_value_heads": 4,
|
| 23 |
"pad_token_id": 0,
|
| 24 |
"pretraining_tp": 1,
|
|
|
|
| 18 |
"mlp_type": "glu",
|
| 19 |
"model_type": "tiny_llama",
|
| 20 |
"num_attention_heads": 4,
|
| 21 |
+
"num_hidden_layers": 9,
|
| 22 |
"num_key_value_heads": 4,
|
| 23 |
"pad_token_id": 0,
|
| 24 |
"pretraining_tp": 1,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7961528
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00986137b5c8d810614af20130c66f0bb56b495e62ec7a540d0c9f4a5924f369
|
| 3 |
size 7961528
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4856
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:068e69c46606e5cfaa391fb7cdda46eead0719513de3a269c81b9c00c24553c0
|
| 3 |
size 4856
|
training_log.jsonl
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:35c8fe6dd0493d9bfeae7ea26f29122adca19b29e629eb5b77a97ce107b9f27d
|
| 3 |
+
size 8042194
|