Any-to-Any
Transformers
Safetensors
GGUF
English
gemma4
image-text-to-text
4-bit precision
8-bit precision
bitsandbytes
conversational
Instructions to use LetheanNetwork/lemer-bk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LetheanNetwork/lemer-bk with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("LetheanNetwork/lemer-bk") model = AutoModelForMultimodalLM.from_pretrained("LetheanNetwork/lemer-bk", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LetheanNetwork/lemer-bk 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 LetheanNetwork/lemer-bk:Q4_K_M # Run inference directly in the terminal: llama cli -hf LetheanNetwork/lemer-bk:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LetheanNetwork/lemer-bk:Q4_K_M # Run inference directly in the terminal: llama cli -hf LetheanNetwork/lemer-bk:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf LetheanNetwork/lemer-bk:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf LetheanNetwork/lemer-bk:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf LetheanNetwork/lemer-bk:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf LetheanNetwork/lemer-bk:Q4_K_M
Use Docker
docker model run hf.co/LetheanNetwork/lemer-bk:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use LetheanNetwork/lemer-bk with Ollama:
ollama run hf.co/LetheanNetwork/lemer-bk:Q4_K_M
- Unsloth Studio
How to use LetheanNetwork/lemer-bk with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LetheanNetwork/lemer-bk to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LetheanNetwork/lemer-bk to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LetheanNetwork/lemer-bk to start chatting
- Pi
How to use LetheanNetwork/lemer-bk with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LetheanNetwork/lemer-bk:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "LetheanNetwork/lemer-bk:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use LetheanNetwork/lemer-bk with Docker Model Runner:
docker model run hf.co/LetheanNetwork/lemer-bk:Q4_K_M
- Lemonade
How to use LetheanNetwork/lemer-bk with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LetheanNetwork/lemer-bk:Q4_K_M
Run and chat with the model
lemonade run user.lemer-bk-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use LetheanNetwork/lemer-bk with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LetheanNetwork/lemer-bk:Q4_K_M
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 LetheanNetwork/lemer-bk:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use LetheanNetwork/lemer-bk with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LetheanNetwork/lemer-bk:Q4_K_M
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 "LetheanNetwork/lemer-bk:Q4_K_M" \ --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"
Snider Virgil commited on
Commit ·
c218b73
1
Parent(s): 95412c4
fix: config.json matches HF 4-bit safetensors (BitsAndBytes NF4)
Browse files- config.json +19 -8
config.json
CHANGED
|
@@ -56,6 +56,21 @@
|
|
| 56 |
"image_token_id": 258880,
|
| 57 |
"initializer_range": 0.02,
|
| 58 |
"model_type": "gemma4",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
"text_config": {
|
| 60 |
"attention_bias": false,
|
| 61 |
"attention_dropout": 0.0,
|
|
@@ -112,6 +127,7 @@
|
|
| 112 |
],
|
| 113 |
"max_position_embeddings": 131072,
|
| 114 |
"model_type": "gemma4_text",
|
|
|
|
| 115 |
"num_attention_heads": 8,
|
| 116 |
"num_experts": null,
|
| 117 |
"num_global_key_value_heads": null,
|
|
@@ -141,7 +157,7 @@
|
|
| 141 |
"vocab_size_per_layer_input": 262144
|
| 142 |
},
|
| 143 |
"tie_word_embeddings": true,
|
| 144 |
-
"transformers_version": "5.5.0
|
| 145 |
"video_token_id": 258884,
|
| 146 |
"vision_config": {
|
| 147 |
"_name_or_path": "",
|
|
@@ -186,10 +202,5 @@
|
|
| 186 |
"standardize": false,
|
| 187 |
"use_clipped_linears": true
|
| 188 |
},
|
| 189 |
-
"vision_soft_tokens_per_image": 280
|
| 190 |
-
|
| 191 |
-
"group_size": 64,
|
| 192 |
-
"bits": 4,
|
| 193 |
-
"mode": "affine"
|
| 194 |
-
}
|
| 195 |
-
}
|
|
|
|
| 56 |
"image_token_id": 258880,
|
| 57 |
"initializer_range": 0.02,
|
| 58 |
"model_type": "gemma4",
|
| 59 |
+
"quantization_config": {
|
| 60 |
+
"_load_in_4bit": true,
|
| 61 |
+
"_load_in_8bit": false,
|
| 62 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 63 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 64 |
+
"bnb_4bit_quant_type": "nf4",
|
| 65 |
+
"bnb_4bit_use_double_quant": true,
|
| 66 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 67 |
+
"llm_int8_has_fp16_weight": false,
|
| 68 |
+
"llm_int8_skip_modules": null,
|
| 69 |
+
"llm_int8_threshold": 6.0,
|
| 70 |
+
"load_in_4bit": true,
|
| 71 |
+
"load_in_8bit": false,
|
| 72 |
+
"quant_method": "bitsandbytes"
|
| 73 |
+
},
|
| 74 |
"text_config": {
|
| 75 |
"attention_bias": false,
|
| 76 |
"attention_dropout": 0.0,
|
|
|
|
| 127 |
],
|
| 128 |
"max_position_embeddings": 131072,
|
| 129 |
"model_type": "gemma4_text",
|
| 130 |
+
"moe_intermediate_size": null,
|
| 131 |
"num_attention_heads": 8,
|
| 132 |
"num_experts": null,
|
| 133 |
"num_global_key_value_heads": null,
|
|
|
|
| 157 |
"vocab_size_per_layer_input": 262144
|
| 158 |
},
|
| 159 |
"tie_word_embeddings": true,
|
| 160 |
+
"transformers_version": "5.5.0",
|
| 161 |
"video_token_id": 258884,
|
| 162 |
"vision_config": {
|
| 163 |
"_name_or_path": "",
|
|
|
|
| 202 |
"standardize": false,
|
| 203 |
"use_clipped_linears": true
|
| 204 |
},
|
| 205 |
+
"vision_soft_tokens_per_image": 280
|
| 206 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|