Instructions to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF 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 aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF: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 aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF: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 aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
Use Docker
docker model run hf.co/aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
- Ollama
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with Ollama:
ollama run hf.co/aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
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": "aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with Docker Model Runner:
docker model run hf.co/aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
- Lemonade
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF: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 aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF: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 "aviallon/InternVL3_5-GPT-OSS-20B-A4B-Preview-GGUF: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"
This is a conversion of InternVL3.5 merge based on GPT-OSS-20b model to the GGUF format. It required a few adjustments to the conversion script:
diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py
index eb43520f9..50c4c167a 100755
--- a/convert_hf_to_gguf.py
+++ b/convert_hf_to_gguf.py
@@ -972,11 +972,32 @@ class TextModel(ModelBase):
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(self.dir_model)
vocab_size = self.hparams.get("vocab_size", len(tokenizer.vocab))
- assert max(tokenizer.vocab.values()) < vocab_size
+ if tokenizer.vocab:
+ max_vocab_id = max(tokenizer.vocab.values())
+ if max_vocab_id >= vocab_size:
+ added_vocab = tokenizer.get_added_vocab()
+ added_oob = [tok for tok, tok_id in added_vocab.items() if tok_id >= vocab_size]
+ if added_oob and "vocab_size" in self.hparams:
+ logger.warning(
+ "Tokenizer has added tokens with ids >= model vocab_size; "
+ "these will be ignored. vocab_size=%d, max_token_id=%d, example_added_oob=%s",
+ vocab_size,
+ max_vocab_id,
+ added_oob[:3],
+ )
+ else:
+ if "vocab_size" in self.hparams:
+ logger.warning(
+ "Tokenizer vocab max id (%d) >= hparams vocab_size (%d); "
+ "expanding vocab to fit tokenizer base vocab.",
+ max_vocab_id,
+ vocab_size,
+ )
+ vocab_size = max_vocab_id + 1
tokpre = self.get_vocab_base_pre(tokenizer)
- reverse_vocab = {id_: encoded_tok for encoded_tok, id_ in tokenizer.vocab.items()}
+ reverse_vocab = {id_: encoded_tok for encoded_tok, id_ in tokenizer.vocab.items() if id_ < vocab_size}
added_vocab = tokenizer.get_added_vocab()
added_tokens_decoder = tokenizer.added_tokens_decoder
@@ -10063,6 +10084,16 @@ class GptOssModel(TextModel):
return []
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
+ if name.startswith("language_model.model."):
+ name = "model." + name.removeprefix("language_model.model.")
+ elif name.startswith("language_model."):
+ name = name.removeprefix("language_model.")
+
+ if name.startswith("multi_modal_projector.") or name.startswith("vision_tower.") \
+ or name.startswith("multimodal_projector.") or name.startswith("vision_model.") \
+ or name.startswith("mlp1."):
+ return
+
if "sinks" in name:
name += ".weight"
- Downloads last month
- 470
4-bit
16-bit