Instructions to use appvoid/linear with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use appvoid/linear with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="appvoid/linear")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("appvoid/linear", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use appvoid/linear with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "appvoid/linear" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "appvoid/linear", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/appvoid/linear
- SGLang
How to use appvoid/linear 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 "appvoid/linear" \ --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": "appvoid/linear", "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 "appvoid/linear" \ --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": "appvoid/linear", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use appvoid/linear with Docker Model Runner:
docker model run hf.co/appvoid/linear
Upload config.json with huggingface_hub
Browse files- config.json +36 -0
config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"allow_neg_eigval": false,
|
| 3 |
+
"attn": null,
|
| 4 |
+
"attn_mode": "chunk",
|
| 5 |
+
"bos_token_id": 257,
|
| 6 |
+
"conv_bias": false,
|
| 7 |
+
"conv_size": 4,
|
| 8 |
+
"decay_gate": "vector",
|
| 9 |
+
"decouple_erase": true,
|
| 10 |
+
"eos_token_id": 256,
|
| 11 |
+
"fuse_cross_entropy": true,
|
| 12 |
+
"fuse_linear_cross_entropy": false,
|
| 13 |
+
"fuse_norm": true,
|
| 14 |
+
"fuse_swiglu": true,
|
| 15 |
+
"hidden_act": "swish",
|
| 16 |
+
"hidden_ratio": null,
|
| 17 |
+
"hidden_size": 640,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"intermediate_size": 960,
|
| 20 |
+
"k_head_dim": 128,
|
| 21 |
+
"max_position_embeddings": 4096,
|
| 22 |
+
"model_type": "kronlstm",
|
| 23 |
+
"norm_eps": 1e-05,
|
| 24 |
+
"normalize_v": true,
|
| 25 |
+
"num_heads": 5,
|
| 26 |
+
"num_hidden_layers": 24,
|
| 27 |
+
"transformers_version": "4.57.6",
|
| 28 |
+
"use_beta": true,
|
| 29 |
+
"use_cache": false,
|
| 30 |
+
"use_l2warp": false,
|
| 31 |
+
"use_output_gate": true,
|
| 32 |
+
"use_short_conv": true,
|
| 33 |
+
"use_target_gate": true,
|
| 34 |
+
"v_head_dim": 128,
|
| 35 |
+
"vocab_size": 260
|
| 36 |
+
}
|