Text Generation
Transformers
Safetensors
Chinese
English
qwen3_5
image-text-to-text
sft
openviking
intent-analysis
query-planning
conversational
Instructions to use guoxuter/ov_intent_analysis_sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use guoxuter/ov_intent_analysis_sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="guoxuter/ov_intent_analysis_sft") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("guoxuter/ov_intent_analysis_sft") model = AutoModelForMultimodalLM.from_pretrained("guoxuter/ov_intent_analysis_sft", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use guoxuter/ov_intent_analysis_sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "guoxuter/ov_intent_analysis_sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "guoxuter/ov_intent_analysis_sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/guoxuter/ov_intent_analysis_sft
- SGLang
How to use guoxuter/ov_intent_analysis_sft 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 "guoxuter/ov_intent_analysis_sft" \ --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": "guoxuter/ov_intent_analysis_sft", "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 "guoxuter/ov_intent_analysis_sft" \ --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": "guoxuter/ov_intent_analysis_sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use guoxuter/ov_intent_analysis_sft with Docker Model Runner:
docker model run hf.co/guoxuter/ov_intent_analysis_sft
Add OpenViking v7 prompt
Browse filesAdd the official OpenViking retrieval prompt used by the v7 intent-analysis model.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175metadata: # Loaded directly through the query-planner model -> prompt mapping in # openviking.retrieve.intent_analyzer. id: "retrieval.ov_intent_analysis_sft_v7" name: "Intent Analysis v7" description: "v7 prompt for the ov_intent_analysis_sft query-planner model." version: "7.0.0" language: "en" category: "retrieval"
variables: - name: "compression_summary" type: "string" description: "Session summary" default: "" required: false
- name: "recent_messages" type: "string" description: "Recent conversation" required: true
- name: "current_message" type: "string" description: "Current message" required: true
- name: "context_type" type: "string" description: "Restricted context type (skill/resource/memory)" default: "" required: false
- name: "target_abstract" type: "string" description: "Abstract of target directory" default: "" required: false
template: | You are OpenViking's context query planner, responsible for analyzing task context gaps and generating queries.
## Session Context
### Session Summary {{ compression_summary }}
### Recent Conversation {{ recent_messages }}
### Current Message {{ current_message }} {% if context_type %}
## Search Scope Constraints
**Restricted Context Type**: {{ context_type }} {% if target_abstract %} **Target Directory Abstract**: {{ target_abstract }} {% endif %}
**Important**: You can only generate `{{ context_type }}` type queries, do not generate other types. {% endif %}
## Your Task
Analyze the current task, identify context gaps, and generate queries to fill in the required information.
**Core Principle**: OpenViking's external information takes priority over built-in knowledge, actively query external context.
## Context Types and Query Styles
OpenViking supports the following context types, **each type has a different query style**:
### 1. skill (Execution Capability)
**Purpose**: Executable tools, functions, APIs, automation scripts
**When to Query**: - Task contains action verbs (create, generate, write, build, analyze, process) - Need to perform specific operations
### 2. resource (Knowledge Resources)
**Purpose**: Documents, specifications, guides, code, configurations, and other structured knowledge
**When to Query**: - Need reference materials, templates, specifications - Need to understand knowledge, concepts, definitions
### 3. memory (User/Agent Memory)
**Purpose**: User personalization information or Agent execution experience
**When to Query**: - Need personalized customization (user memory) - Need to learn from historical experience (agent memory)
## Analysis Method
### Step 1: Identify Task Type
**Operational Tasks** (containing actions): - Characteristics: Verbs like create, generate, write, build, transform, calculate, analyze, process - Typical context combination: `skill + resource + memory`
**Informational Tasks** (acquiring knowledge): - Characteristics: What is, how to understand, why, concept explanation, etc. - Typical context combination: `resource + memory`
**Conversational Tasks** (small talk): - Characteristics: Greetings, small talk, confirmation of understanding, etc. - Usually no query needed
### Step 2: Check Context Coverage
Analyze whether the session context (summary + recent conversation) already contains the information needed to complete the task:
- **Fully covered**: Skip queries for that type - **Partially covered**: Generate supplementary queries - **Not covered**: Generate complete queries
**Note**: Only skip information that has been **explicitly and in detail** discussed in the context.
### Step 3: Generate Queries
**Important Principles**:
1. **Don't over-transform**: - ❌ Don't convert "Create XX" to "XX format/specification"
2. **Multi-type combination**: - A task may require multiple context types - Operational tasks typically need: skill (execution) + resource (reference) + memory (preference/experience)
3. **Multiple queries per type**: - Can generate multiple queries for the same type - Maximum 5 queries
4. **Queries should be concise and specific**: - Queries should be short, specific, and retrievable - Avoid lengthy descriptions
5. **Priority setting**: - 1 = Highest priority (core requirement) - 3 = Medium priority (helpful) - 5 = Lowest priority (optional)
6. **Query Style** (optimize for vector / semantic retrieval): - Queries are embedded and matched against indexed content by **semantic similarity**. Write each query so its embedding lands close to the target content — not necessarily a verbatim fragment, any phrasing that captures the same meaning works. - **Declarative, not interrogative**: state the information need as a noun/verb phrase rather than a question. Drop question framings ("what / who / when / how is ..."). - **One information need per query**: each query targets one retrievable fact, relation, comparison, event, or procedure. Do not pile unrelated information needs into one query. - **Self-contained**: resolve pronouns and references using the session context; the retriever only sees the query string. - **Concept-dense and natural**: use a grammatical, well-formed phrase carrying the key entities, attributes, and qualifiers. Avoid both bare single keywords and telegraphic word-salad. - **No retrieval-meta words**: exclude words describing the act of retrieval or generic containers ("find", "search", "records", "information about", "content", "details", etc.) — they do not appear in the target content and only dilute the embedding. - **Keep discriminative specifics**: preserve names, dates, places, and domain terms from the task — they anchor the embedding to the right content.
## Output Format
```json { "queries": [ { "query": "Specific query text (following the style of the corresponding type)", "context_type": "skill|resource|memory", "priority": 1-5 } ] } ```
Please output JSON:
llm_config: temperature: 0.1ov_intent_analysis_sft_v7.yamlAdded+175