Text Generation
Transformers
Safetensors
mistral3
image-text-to-text
decision-model
typed-decisions
jev
jevbench
calibration
decode-free
multilingual
vision-language
conversational
Instructions to use StandardThinking/StandardOne-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StandardThinking/StandardOne-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StandardThinking/StandardOne-3B") 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?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("StandardThinking/StandardOne-3B") model = AutoModelForMultimodalLM.from_pretrained("StandardThinking/StandardOne-3B", 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
- vLLM
How to use StandardThinking/StandardOne-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StandardThinking/StandardOne-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StandardThinking/StandardOne-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/StandardThinking/StandardOne-3B
- SGLang
How to use StandardThinking/StandardOne-3B 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 "StandardThinking/StandardOne-3B" \ --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": "StandardThinking/StandardOne-3B", "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 "StandardThinking/StandardOne-3B" \ --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": "StandardThinking/StandardOne-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use StandardThinking/StandardOne-3B with Docker Model Runner:
docker model run hf.co/StandardThinking/StandardOne-3B
Download server/examples/smoke.py from StandardThinking/StandardOne-3B: direct link, hf CLI and curl.
- Browser
- Download file 1.87 kB
-
https://huggingface.co/StandardThinking/StandardOne-3B/resolve/main/server/examples/smoke.py
- Command line
-
hf download hf://StandardThinking/StandardOne-3B/server/examples/smoke.py
-
curl -L -o smoke.py https://huggingface.co/StandardThinking/StandardOne-3B/resolve/main/server/examples/smoke.py
1.87 kB
| """Smoke-test a running adapter, optionally including actual image bytes.""" | |
| import argparse | |
| import base64 | |
| import json | |
| import mimetypes | |
| import os | |
| import time | |
| from pathlib import Path | |
| from urllib.request import Request, urlopen | |
| def main(): | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument("--base-url", default="http://127.0.0.1:30120") | |
| parser.add_argument( | |
| "--request", type=Path, default=Path(__file__).with_name("request.json") | |
| ) | |
| parser.add_argument("--image", type=Path, action="append", default=[]) | |
| args = parser.parse_args() | |
| body = json.loads(args.request.read_text()) | |
| for path in args.image: | |
| mime = mimetypes.guess_type(path.name)[0] | |
| if not mime or not mime.startswith("image/"): | |
| parser.error(f"Cannot identify image type: {path.name}") | |
| encoded = base64.b64encode(path.read_bytes()).decode("ascii") | |
| body.setdefault("images", []).append(f"data:{mime};base64,{encoded}") | |
| headers = {"Content-Type": "application/json"} | |
| if key := os.environ.get("JEV_API_KEY"): | |
| headers["Authorization"] = f"Bearer {key}" | |
| request = Request( | |
| args.base_url.rstrip("/") + "/v1/systemone", | |
| data=json.dumps(body).encode(), | |
| headers=headers, | |
| ) | |
| started = time.perf_counter() | |
| with urlopen(request, timeout=120) as response: | |
| result = json.load(response) | |
| elapsed = (time.perf_counter() - started) * 1000 | |
| if result.get("usage", {}).get("output_tokens") != 0: | |
| raise RuntimeError("Expected zero generated tokens") | |
| if set(result.get("answers", {})) != set(body["questions"]): | |
| raise RuntimeError("Missing decision answers") | |
| print(json.dumps(result, indent=2, ensure_ascii=False)) | |
| print(f"End-to-end HTTP latency: {elapsed:.1f} ms (not a GPU benchmark)") | |
| if __name__ == "__main__": | |
| main() | |