Text Generation
Transformers
Safetensors
GGUF
English
Spanish
lfm3
liquidvamp
wamphyre-ai
abliterated
code
tool-use
lora
bf16
vulkan
experimental
conversational
custom_code
Instructions to use WamphyreAI/LiquidVamp-R4-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WamphyreAI/LiquidVamp-R4-1.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WamphyreAI/LiquidVamp-R4-1.7B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WamphyreAI/LiquidVamp-R4-1.7B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("WamphyreAI/LiquidVamp-R4-1.7B", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use WamphyreAI/LiquidVamp-R4-1.7B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16 # Run inference directly in the terminal: llama cli -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16 # Run inference directly in the terminal: llama cli -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16
Use Docker
docker model run hf.co/WamphyreAI/LiquidVamp-R4-1.7B:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use WamphyreAI/LiquidVamp-R4-1.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WamphyreAI/LiquidVamp-R4-1.7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WamphyreAI/LiquidVamp-R4-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/WamphyreAI/LiquidVamp-R4-1.7B:BF16
- SGLang
How to use WamphyreAI/LiquidVamp-R4-1.7B 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 "WamphyreAI/LiquidVamp-R4-1.7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WamphyreAI/LiquidVamp-R4-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "WamphyreAI/LiquidVamp-R4-1.7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WamphyreAI/LiquidVamp-R4-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use WamphyreAI/LiquidVamp-R4-1.7B with Ollama:
ollama run hf.co/WamphyreAI/LiquidVamp-R4-1.7B:BF16
- Unsloth Desktop
- Pi
How to use WamphyreAI/LiquidVamp-R4-1.7B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "WamphyreAI/LiquidVamp-R4-1.7B:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use WamphyreAI/LiquidVamp-R4-1.7B with Docker Model Runner:
docker model run hf.co/WamphyreAI/LiquidVamp-R4-1.7B:BF16
- Lemonade
How to use WamphyreAI/LiquidVamp-R4-1.7B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull WamphyreAI/LiquidVamp-R4-1.7B:BF16
Run and chat with the model
lemonade run user.LiquidVamp-R4-1.7B-BF16
List all available models
lemonade list
- Hermes Agent
How to use WamphyreAI/LiquidVamp-R4-1.7B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default WamphyreAI/LiquidVamp-R4-1.7B:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use WamphyreAI/LiquidVamp-R4-1.7B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf WamphyreAI/LiquidVamp-R4-1.7B:BF16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "WamphyreAI/LiquidVamp-R4-1.7B:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download configuration_lfm3.py from WamphyreAI/LiquidVamp-R4-1.7B: direct link, hf CLI and curl.
- Browser
- Download file 6.11 kB
-
https://huggingface.co/WamphyreAI/LiquidVamp-R4-1.7B/resolve/main/configuration_lfm3.py
- Command line
-
hf download hf://WamphyreAI/LiquidVamp-R4-1.7B/configuration_lfm3.py
-
curl -L -o configuration_lfm3.py https://huggingface.co/WamphyreAI/LiquidVamp-R4-1.7B/resolve/main/configuration_lfm3.py
6.11 kB
| # Copyright 2026 The HuggingFace Team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| from huggingface_hub.dataclasses import strict | |
| from transformers.configuration_utils import PreTrainedConfig | |
| from transformers.utils import auto_docstring | |
| class Lfm3Config(PreTrainedConfig): | |
| r""" | |
| rope_parameters (`dict[str, RopeParameters]`, *optional*): | |
| RoPE parameters keyed by attention layer type, for example `{"full_attention": {"rope_type": "default", | |
| "rope_theta": 1000000.0, "partial_rotary_factor": 0.5}, "sliding_attention": {"rope_type": "default", | |
| "rope_theta": 10000.0}}`. `conv` layers do not use RoPE and have no entry. Full-attention layers rotate the | |
| first `partial_rotary_factor * head_dim` dimensions and leave the rest unrotated. | |
| conv_bias (`bool`, *optional*, defaults to `False`): | |
| Whether to use bias in the conv layers. | |
| conv_L_cache (`int`, *optional*, defaults to 7): | |
| L_cache dim in the conv layers. | |
| layer_types (`list[str]`, *optional*): | |
| Per-layer operator type, each one of `"full_attention"`, `"sliding_attention"` or `"conv"`. Defaults to the | |
| LFM3 pattern of a full-attention layer every fourth layer starting from the third, a sliding-attention layer | |
| in between, and gated short convolutions elsewhere. | |
| sliding_window (`int`, *optional*, defaults to 256): | |
| Sliding-window size of the `sliding_attention` layers. | |
| use_sandwich_norm (`bool`, *optional*, defaults to `True`): | |
| Whether to apply an RMSNorm to the operator and feed-forward outputs before they enter the residual stream. | |
| ```python | |
| >>> from transformers import Lfm3Model, Lfm3Config | |
| >>> # Initializing a LFM3 model | |
| >>> configuration = Lfm3Config() | |
| >>> # Initializing a model from the LFM3-1.7B style configuration | |
| >>> model = Lfm3Model(configuration) | |
| >>> # Accessing the model configuration | |
| >>> configuration = model.config | |
| ``` | |
| """ | |
| model_type = "lfm3" | |
| keys_to_ignore_at_inference = ["past_key_values"] | |
| default_theta = 1000000.0 | |
| vocab_size: int = 128_000 | |
| hidden_size: int = 2048 | |
| intermediate_size: int = 7680 | |
| num_hidden_layers: int = 24 | |
| num_attention_heads: int = 16 | |
| num_key_value_heads: int = 4 | |
| max_position_embeddings: int = 128_000 | |
| initializer_range: float = 0.02 | |
| norm_eps: float = 0.00001 | |
| use_cache: bool = True | |
| pad_token_id: int | None = 124_893 | |
| bos_token_id: int | None = 124_894 | |
| eos_token_id: int | list[int] | None = 124_900 | |
| tie_word_embeddings: bool = True | |
| rope_parameters: dict | None = None | |
| conv_bias: bool = False | |
| conv_L_cache: int = 7 | |
| layer_types: list[str] | None = None | |
| _attention_layer_types = ("full_attention", "sliding_attention") | |
| head_dim: int | None = None | |
| sliding_window: int | None = 256 | |
| use_sandwich_norm: bool = True | |
| def __post_init__(self, **kwargs): | |
| if self.head_dim is None: | |
| self.head_dim = self.hidden_size // self.num_attention_heads | |
| if self.rope_parameters is None: | |
| self.rope_parameters = { | |
| "full_attention": {"rope_type": "default", "rope_theta": 1_000_000.0, "partial_rotary_factor": 0.5}, | |
| "sliding_attention": {"rope_type": "default", "rope_theta": 10_000.0}, | |
| } | |
| if self.layer_types is None: | |
| self.layer_types = [ | |
| "full_attention" if i % 4 == 2 else "sliding_attention" if i % 4 == 0 and i > 0 else "conv" | |
| for i in range(self.num_hidden_layers) | |
| ] | |
| self.tie_word_embeddings = kwargs.pop("tie_embedding", self.tie_word_embeddings) | |
| super().__post_init__(**kwargs) | |
| def validate_architecture(self): | |
| """Part of ``@strict``-powered validation.""" | |
| if len(self.layer_types) != self.num_hidden_layers: | |
| raise ValueError( | |
| f"`layer_types` has {len(self.layer_types)} entries but `num_hidden_layers` is {self.num_hidden_layers}." | |
| ) | |
| allowed_layer_types = (*self._attention_layer_types, "conv") | |
| invalid_layer_types = [layer_type for layer_type in self.layer_types if layer_type not in allowed_layer_types] | |
| if invalid_layer_types: | |
| raise ValueError(f"`layer_types` entries must be one of {allowed_layer_types}; got {invalid_layer_types}.") | |
| if "sliding_attention" in self.layer_types and self.sliding_window is None: | |
| raise ValueError("`layer_types` has `sliding_attention` layers but `sliding_window` is None.") | |
| missing_rope = [ | |
| layer_type | |
| for layer_type in self._attention_layer_types | |
| if layer_type in self.layer_types and layer_type not in self.rope_parameters | |
| ] | |
| if missing_rope: | |
| raise ValueError(f"`rope_parameters` has no entry for the {missing_rope} layers in `layer_types`.") | |
| for layer_type, rope_params in self.rope_parameters.items(): | |
| if not isinstance(rope_params, dict): | |
| continue | |
| if ( | |
| rope_params.get("rope_type", "default") in ("dynamic", "longrope") | |
| and rope_params.get("partial_rotary_factor", 1.0) < 1 | |
| ): | |
| raise ValueError( | |
| f"`{rope_params['rope_type']}` RoPE recomputes its frequencies during the forward pass over the " | |
| f"rotated dimension only and cannot keep LFM3's partial rotation on `{layer_type}` layers." | |
| ) | |
| __all__ = ["Lfm3Config"] | |