Text Generation
Transformers
Safetensors
llama
experimental
web-agent
tool-calling
lora-merged
bf16
conversational
text-generation-inference
Instructions to use webbrain-one/webbrain-compass-tiny-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webbrain-one/webbrain-compass-tiny-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webbrain-one/webbrain-compass-tiny-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("webbrain-one/webbrain-compass-tiny-v2") model = AutoModelForCausalLM.from_pretrained("webbrain-one/webbrain-compass-tiny-v2", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use webbrain-one/webbrain-compass-tiny-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webbrain-one/webbrain-compass-tiny-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/webbrain-compass-tiny-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/webbrain-one/webbrain-compass-tiny-v2
- SGLang
How to use webbrain-one/webbrain-compass-tiny-v2 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 "webbrain-one/webbrain-compass-tiny-v2" \ --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": "webbrain-one/webbrain-compass-tiny-v2", "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 "webbrain-one/webbrain-compass-tiny-v2" \ --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": "webbrain-one/webbrain-compass-tiny-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use webbrain-one/webbrain-compass-tiny-v2 with Docker Model Runner:
docker model run hf.co/webbrain-one/webbrain-compass-tiny-v2
Download provenance/contract.json from webbrain-one/webbrain-compass-tiny-v2: direct link, hf CLI and curl.
- Browser
- Download file 4.16 kB
-
https://huggingface.co/webbrain-one/webbrain-compass-tiny-v2/resolve/main/provenance/contract.json
- Command line
-
hf download hf://webbrain-one/webbrain-compass-tiny-v2/provenance/contract.json
-
curl -L -o contract.json https://huggingface.co/webbrain-one/webbrain-compass-tiny-v2/resolve/main/provenance/contract.json
4.16 kB
| {"approvalSha256": "3a0bb819974fffd9ea7f2e9bedc495b7d0bddcb0b4d7b8b143301bc16d926550", "baseImplementationSha256": "f1f57fbaab6d4bc6fd7665adc528f7286c84c7514e60fe8fadd44dbb56b085cf", "benchmarkReleaseGates": {"antiMaximum": 1, "firstTurnErrorsMaximum": 0, "firstTurnStructuredMinimum": 93, "looseMinimum": 43, "scenarioErrorsMaximum": 1, "scoredDenominator": 89, "strictMinimum": 15}, "bf16Differences": "record only, never tune from them; original v1/v2 remain failed", "diagnosticSha256": "7c9645cdfe1f22e43a3a40e5e4275fce5234598349a93827117eccb9a7a9933b", "effectiveImplementationSha256": "3f88b4949121374a2d18b91f85b3c90e4bf6dd14d9718faf2a49b5f108435610", "fp32GreedyIdenticalRequired": true, "fp32MaxAbsoluteMaximum": 0.001, "fp32RelativeL2Maximum": 0.0001, "greedyNewTokenLimit": 32, "helperSha256": "fbc50149bc869bbaa88864f0b9ac8ce1bd96dd89fa5b51574ab5ad1d2d667329", "implementationSha256": "8ff37dca66f7d9f97d7e02723f12d5d0da8b3c4ece16aefec3bbe85695427af3", "independentWeightCheck": {"atol": 1e-06, "method": "CPU raw base + 2*(raw B @ raw A), independently of PEFT merge", "rtol": 1e-05}, "priorAttemptContractSha256": "deaa6b9c4a8b79bf649726edb2ae9cadeb43975dd205c2230b0717b1e16bacf3", "probes": [{"messages": [{"content": "Write a short thank-you sentence for a helpful teammate.", "role": "user"}], "name": "brief_thanks", "tools": null}, {"messages": [{"content": "Explain what a browser tab is in one sentence.", "role": "user"}], "name": "definition_tab", "tools": null}, {"messages": [{"content": "Bir dosyayı kaydetmek ne demek? Tek cümleyle açıkla.", "role": "user"}], "name": "turkish_sentence", "tools": null}, {"messages": [{"content": "Summarize in five words: The meeting starts at noon and ends at one.", "role": "user"}], "name": "plain_summary", "tools": null}, {"messages": [{"content": "Open https://example.net/guide with the available tool.", "role": "user"}], "name": "single_address", "tools": [{"function": {"description": "Open the given address in the browser.", "name": "open_address", "parameters": {"properties": {"address": {"type": "string"}}, "required": ["address"], "type": "object"}}, "type": "function"}]}, {"messages": [{"content": "Open https://example.net/find?name=blue&sort=recent using the tool.", "role": "user"}], "name": "escaped_address", "tools": [{"function": {"description": "Open the given address in the browser.", "name": "open_address", "parameters": {"properties": {"address": {"type": "string"}}, "required": ["address"], "type": "object"}}, "type": "function"}]}, {"messages": [{"content": "Save the labels green and amber with enabled set to false.", "role": "user"}], "name": "typed_labels", "tools": [{"function": {"description": "Store the supplied labels and whether they are enabled.", "name": "save_labels", "parameters": {"properties": {"enabled": {"type": "boolean"}, "labels": {"items": {"type": "string"}, "type": "array"}}, "required": ["labels", "enabled"], "type": "object"}}, "type": "function"}]}, {"messages": [{"content": "Save the label blue and enable it.", "role": "user"}, {"content": "", "role": "assistant", "tool_calls": [{"function": {"arguments": {"enabled": true, "labels": ["blue"]}, "name": "save_labels"}, "id": "calibration_call", "type": "function"}]}, {"content": "{\"saved\":true}", "name": "save_labels", "role": "tool", "tool_call_id": "calibration_call"}, {"content": "Now replace that with the label orange and disable it.", "role": "user"}], "name": "tool_history", "tools": [{"function": {"description": "Store the supplied labels and whether they are enabled.", "name": "save_labels", "parameters": {"properties": {"enabled": {"type": "boolean"}, "labels": {"items": {"type": "string"}, "type": "array"}}, "required": ["labels", "enabled"], "type": "object"}}, "type": "function"}]}], "proposalSha256": "4f012598d50323f587dddf448b1ed3abbe4539b30e8a2bce35537462a51fdf57", "reloadConfigExcludedRuntimeKeys": ["_name_or_path", "_attn_implementation_internal", "transformers_version"], "runtimeCorrection": "Preserve native FP32 nonpersistent RoPE buffers; cast only model parameters. All v4 gates unchanged.", "status": "approved-v4-candidate-contract"} | |