Instructions to use vtava/SmolLM2-135M-MemoryFusion-Sequential-R64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vtava/SmolLM2-135M-MemoryFusion-Sequential-R64 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vtava/SmolLM2-135M-MemoryFusion-Sequential-R64")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vtava/SmolLM2-135M-MemoryFusion-Sequential-R64", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vtava/SmolLM2-135M-MemoryFusion-Sequential-R64 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vtava/SmolLM2-135M-MemoryFusion-Sequential-R64" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vtava/SmolLM2-135M-MemoryFusion-Sequential-R64", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vtava/SmolLM2-135M-MemoryFusion-Sequential-R64
- SGLang
How to use vtava/SmolLM2-135M-MemoryFusion-Sequential-R64 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 "vtava/SmolLM2-135M-MemoryFusion-Sequential-R64" \ --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": "vtava/SmolLM2-135M-MemoryFusion-Sequential-R64", "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 "vtava/SmolLM2-135M-MemoryFusion-Sequential-R64" \ --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": "vtava/SmolLM2-135M-MemoryFusion-Sequential-R64", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vtava/SmolLM2-135M-MemoryFusion-Sequential-R64 with Docker Model Runner:
docker model run hf.co/vtava/SmolLM2-135M-MemoryFusion-Sequential-R64
File size: 1,567 Bytes
3d11298 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | {
"format_version": 1,
"stage": "accepted_layer_0",
"accepted_layers": [
0
],
"config": {
"feature_dim": 32,
"memory_rank": 64,
"dilations": [
1,
2,
4,
8,
16,
32,
64,
128
],
"shifted_window": 8,
"train_output_projection": true
},
"layer_reports": [
{
"layer": 0,
"accepted": false,
"steps": 275,
"nmse": 0.048099592328071594,
"cosine": 0.9809460043907166,
"probe_nll": 2.957142174243927,
"incremental_delta_nll": 0.04405015707015991,
"cumulative_delta_nll": 0.04405015707015991,
"round": 1
},
{
"layer": 0,
"accepted": false,
"steps": 300,
"nmse": 0.02023264765739441,
"cosine": 0.991240918636322,
"probe_nll": 2.9379348754882812,
"incremental_delta_nll": 0.02484285831451416,
"cumulative_delta_nll": 0.02484285831451416,
"round": 2
},
{
"layer": 0,
"accepted": false,
"steps": 275,
"nmse": 0.01509437058120966,
"cosine": 0.9934894442558289,
"probe_nll": 2.933886468410492,
"incremental_delta_nll": 0.020794451236724854,
"cumulative_delta_nll": 0.020794451236724854,
"round": 3
},
{
"layer": 0,
"accepted": true,
"steps": 125,
"nmse": 0.018665021285414696,
"cosine": 0.9919254779815674,
"probe_nll": 2.9270507097244263,
"incremental_delta_nll": 0.01395869255065918,
"cumulative_delta_nll": 0.01395869255065918,
"round": 4
}
]
} |