Instructions to use lxcxjxhx/Qwen3.5-0.8B-HOS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lxcxjxhx/Qwen3.5-0.8B-HOS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lxcxjxhx/Qwen3.5-0.8B-HOS") 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("lxcxjxhx/Qwen3.5-0.8B-HOS") model = AutoModelForMultimodalLM.from_pretrained("lxcxjxhx/Qwen3.5-0.8B-HOS", 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 lxcxjxhx/Qwen3.5-0.8B-HOS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lxcxjxhx/Qwen3.5-0.8B-HOS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lxcxjxhx/Qwen3.5-0.8B-HOS", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/lxcxjxhx/Qwen3.5-0.8B-HOS
- SGLang
How to use lxcxjxhx/Qwen3.5-0.8B-HOS 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 "lxcxjxhx/Qwen3.5-0.8B-HOS" \ --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": "lxcxjxhx/Qwen3.5-0.8B-HOS", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "lxcxjxhx/Qwen3.5-0.8B-HOS" \ --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": "lxcxjxhx/Qwen3.5-0.8B-HOS", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use lxcxjxhx/Qwen3.5-0.8B-HOS with Docker Model Runner:
docker model run hf.co/lxcxjxhx/Qwen3.5-0.8B-HOS
| # 数据下载与清洗脚本 | |
| # 适用于 Qwen3.5-0.8B-HOS 训练流程 | |
| set -e | |
| echo "============================================" | |
| echo " 准备训练数据集" | |
| echo "============================================" | |
| # 数据集目录 | |
| DATA_DIR="datasets" | |
| mkdir -p "$DATA_DIR" | |
| # 从 HuggingFace 下载数据集 | |
| echo "[1/4] 下载数据集..." | |
| python -c " | |
| from datasets import load_dataset | |
| from huggingface_hub import hf_hub_download | |
| import os | |
| # 下载 infosec-dataset-training 数据集 | |
| print('下载 cybersecurity_hq...') | |
| ds = load_dataset('lxcxjxhx/infosec-dataset-training', 'cybersecurity_hq') | |
| ds['train'].to_json(os.path.join('$DATA_DIR', 'cybersecurity_hq.jsonl'), orient='records', lines=True, force_ascii=False) | |
| print('下载 cybersecurity_sharegpt...') | |
| ds = load_dataset('lxcxjxhx/infosec-dataset-training', 'cybersecurity_sharegpt') | |
| ds['train'].to_json(os.path.join('$DATA_DIR', 'cybersecurity_sharegpt.jsonl'), orient='records', lines=True, force_ascii=False) | |
| print('下载 cnvd_vulnerability...') | |
| ds = load_dataset('lxcxjxhx/infosec-dataset-training', 'cnvd_vulnerability') | |
| ds['train'].to_json(os.path.join('$DATA_DIR', 'cnvd_vulnerability.jsonl'), orient='records', lines=True, force_ascii=False) | |
| print('下载 merged_cybersec...') | |
| ds = load_dataset('lxcxjxhx/infosec-dataset-training', 'merged_cybersec') | |
| ds['train'].to_json(os.path.join('$DATA_DIR', 'merged_cybersec.jsonl'), orient='records', lines=True, force_ascii=False) | |
| print('数据集下载完成!') | |
| " | |
| # 数据清洗 | |
| echo "[2/4] 数据清洗..." | |
| python scripts/clean_data.py | |
| # 验证数据集 | |
| echo "[3/4] 验证数据集..." | |
| python -c " | |
| import json | |
| import os | |
| data_dir = '$DATA_DIR' | |
| files = ['cybersecurity_hq.jsonl', 'cybersecurity_sharegpt.jsonl', 'cnvd_vulnerability.jsonl', 'merged_cybersec.jsonl'] | |
| for f in files: | |
| path = os.path.join(data_dir, f) | |
| if os.path.exists(path): | |
| with open(path, 'r', encoding='utf-8') as file: | |
| count = sum(1 for _ in file) | |
| print(f'{f}: {count} 条记录') | |
| else: | |
| print(f'{f}: 文件不存在!') | |
| " | |
| # 复制 dataset_info.json | |
| echo "[4/4] 配置数据集信息..." | |
| cp datasets/dataset_info.json "$DATA_DIR/dataset_info.json" 2>/dev/null || echo "dataset_info.json 已存在" | |
| echo "============================================" | |
| echo " 数据集准备完成!" | |
| echo "============================================" | |