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
| {"adapterSha256": "2e1d86e4fd7c377a2db33bf93af6951bf7db941d0a265eed8a934a6fc42feefe", "completionSha256": "805c995d3797b8a3f7ddd402ccf84773021affcafe8a206086ca2dfe06b3c31d", "training": {"configSha256": "0f17b59149993b54d37d742c38498c2866edcdaa24e545300b0f4b7ea7302144", "datasetManifestSha256": "822a167383353f3942f59ad042363fd3bd7b8f5df767b0338345d861cbcca4b1", "finalValidation": {"epoch": 1.0, "eval_ask_loss": 1.2844717502593994, "eval_ask_runtime": 31.426, "eval_ask_samples_per_second": 1.814, "eval_ask_steps_per_second": 1.814, "eval_compact-action-noncommercial-weblinx_loss": 0.011626693420112133, "eval_compact-action-noncommercial-weblinx_runtime": 28.5725, "eval_compact-action-noncommercial-weblinx_samples_per_second": 1.4, "eval_compact-action-noncommercial-weblinx_steps_per_second": 1.4, "eval_compact-action_loss": 1.1079974174499512, "eval_compact-action_runtime": 96.4125, "eval_compact-action_samples_per_second": 1.151, "eval_compact-action_steps_per_second": 1.151, "eval_compact-escalation_loss": 1.4954874515533447, "eval_compact-escalation_runtime": 3.405, "eval_compact-escalation_samples_per_second": 1.468, "eval_compact-escalation_steps_per_second": 1.468, "num_input_tokens_seen": 76993328}, "optimizerStep": 457, "optimizerStepsTotal": 457, "resumeFromCheckpoint": null, "schemaVersion": 1, "sealedTestOpened": false, "smokeSteps": 0, "stateLedger": "E:\\webbrain-curated-v2-sources\\runs\\webbrain-compass-v2-minicpm5-2b-reviewed-runtime-v2\\webbrain-compass-v2-minicpm5-2b-sft-v1-b3c9b2327bfbd41a\\full-one-epoch\\training-state.append-only.jsonl", "status": "webbrain-compass-v2-training-complete", "trainableParameters": 25116672, "trainingLoss": 0.893471076921509}, "trainingReportSha256": "31e459f53bd548e82e8930596107941ccf23c1de2290446be037d48e05d0836c", "verifiedArtifacts": 153} | |