Image-Text-to-Text
Transformers
English
Chinese
eviscene
multimodal
image-factuality
agent
sft
distillation
Instructions to use ZiAnwang/EviScene with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZiAnwang/EviScene with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ZiAnwang/EviScene")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ZiAnwang/EviScene", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZiAnwang/EviScene with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZiAnwang/EviScene" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZiAnwang/EviScene", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ZiAnwang/EviScene
- SGLang
How to use ZiAnwang/EviScene 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 "ZiAnwang/EviScene" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZiAnwang/EviScene", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ZiAnwang/EviScene" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZiAnwang/EviScene", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ZiAnwang/EviScene with Docker Model Runner:
docker model run hf.co/ZiAnwang/EviScene
Download eviscene/tools/context_memory.py from ZiAnwang/EviScene: direct link, hf CLI and curl.
- Browser
- Download file 2.91 kB
-
https://huggingface.co/ZiAnwang/EviScene/resolve/main/eviscene/tools/context_memory.py
- Command line
-
hf download hf://ZiAnwang/EviScene/eviscene/tools/context_memory.py
-
curl -L -o context_memory.py https://huggingface.co/ZiAnwang/EviScene/resolve/main/eviscene/tools/context_memory.py
2.91 kB
| """Bounded access to the current case's immutable investigation archive.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass, field | |
| from typing import Any, Dict | |
| from eviscene.orchestrator.runtime_events import current_case_runtime_store | |
| from eviscene.tools.base import BaseTool | |
| class RecallEvidenceTool(BaseTool): | |
| name: str = "recall_evidence" | |
| description: str = ( | |
| "Find relevant candidates in this case's archived tool results. " | |
| "Candidates are memory only, not new Evidence; call read_evidence for exact content." | |
| ) | |
| parameters: dict = field( | |
| default_factory=lambda: { | |
| "type": "object", | |
| "properties": { | |
| "query": {"type": "string"}, | |
| "filters": { | |
| "type": "object", | |
| "description": ( | |
| "Optional exact filters such as tool, stage, task_id, " | |
| "claim_ids, hypothesis_id, evidence_ids, or failure_ids." | |
| ), | |
| }, | |
| "top_k": {"type": "integer", "minimum": 1, "maximum": 12}, | |
| }, | |
| "required": ["query"], | |
| } | |
| ) | |
| def call(self, params: Dict[str, Any]) -> Dict[str, Any]: | |
| store = current_case_runtime_store() | |
| if store is None: | |
| return {"status": "error", "error": "no active case archive"} | |
| return store.recall_archive( | |
| query=str(params.get("query", "")), | |
| filters=( | |
| dict(params.get("filters", {}) or {}) | |
| if isinstance(params.get("filters", {}), dict) | |
| else {} | |
| ), | |
| top_k=int(params.get("top_k", 5) or 5), | |
| ) | |
| class ReadEvidenceTool(BaseTool): | |
| name: str = "read_evidence" | |
| description: str = ( | |
| "Read exact paginated content and provenance for one archived memory_id. " | |
| "Use this after recall before relying on archived material." | |
| ) | |
| parameters: dict = field( | |
| default_factory=lambda: { | |
| "type": "object", | |
| "properties": { | |
| "memory_id": {"type": "string"}, | |
| "offset": {"type": "integer", "minimum": 0}, | |
| "length": {"type": "integer", "minimum": 1, "maximum": 24000}, | |
| "include_raw": {"type": "boolean"}, | |
| }, | |
| "required": ["memory_id"], | |
| } | |
| ) | |
| def call(self, params: Dict[str, Any]) -> Dict[str, Any]: | |
| store = current_case_runtime_store() | |
| if store is None: | |
| return {"status": "error", "error": "no active case archive"} | |
| return store.read_archive_item( | |
| str(params.get("memory_id", "")), | |
| offset=int(params.get("offset", 0) or 0), | |
| length=int(params.get("length", 6000) or 6000), | |
| include_raw=bool(params.get("include_raw", True)), | |
| ) | |