Instructions to use oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B-FP8") model = PeftModel.from_pretrained(base_model, "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64") - Transformers
How to use oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64
- SGLang
How to use oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64 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 "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64" \ --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": "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64", "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 "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64" \ --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": "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64 with Docker Model Runner:
docker model run hf.co/oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64
Model Card for Model ID
FP8 base + BF16 LoRA on vLLM
This LoRA has been trained on json BBOXes for erotic images (NSFW).
Setup for serving an FP8-quantized Qwen3.8 VL model with this LoRA:
Config
LLM(
model="Qwen/Qwen3.8-27B-FP8",
dtype="bfloat16",
trust_remote_code=True,
# multimodal
mm_processor_kwargs={"min_pixels": 256 * 1024, "max_pixels": 1_649_664},
limit_mm_per_prompt={"image": 1},
# memory / throughput budget
max_model_len=7168,
max_num_batched_tokens=8192,
max_num_seqs=170,
gpu_memory_utilization=0.96,
tensor_parallel_size=1,
# reasoning
reasoning_parser="qwen3",
# LoRA
enable_lora=True,
max_lora_rank=64,
max_loras=1,
enable_tower_connector_lora=True,
lora_dtype="bfloat16",
)
lora = LoRARequest("combined", 1, "oldhag88/Qwen3.8-27B-json_captioner-basefp8-Rank64")
llm.chat(..., lora_request=lora)
Notes
- FP8 base + BF16 LoRA: the base weights are FP8-quantized checkpoints (loaded
directly, no scaling config needed), while the LoRA adapter runs in
bfloat16vialora_dtype. This avoids quantizing the adapter and typically trains/ serves fine with a rank up tomax_lora_rank=64. enable_tower_connector_lora=True: required for VL models — it trains LoRA on the vision-to-LLM (tower) connector projection in addition to the language model attention/MLP layers. Without it, adapter weights on the connector are silently dropped.max_loras=1: only one adapter is resident;lora_requestid1maps to the "combined" adapter. Increase if you want to serve multiple adapters concurrently (costs extra KV/gPU memory per resident adapter).reasoning_parser="qwen3"+ chat kwargsenable_thinking=True, reasoning_effort="medium": enables Qwen3 thinking mode; the parser splits<think>...</think>out of the completion text.- Prefix caching note:
enable_prefix_caching=Falsewas set here even though the workload shares an identical system+user text prefix across requests. Leave it enabled (default) unless it conflicts with your version's LoRA + FP8 support. - Prompt-mm resize clamp:
min_pixels/max_pixelscap the per-image token budget (1,649,664 px² ≈ ~2100 image tokens); pre-resize large images client-side as well to cut decode/preprocess CPU time.
- Downloads last month
- 35
