Instructions to use Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience") 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("Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience") model = AutoModelForMultimodalLM.from_pretrained("Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience", 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 Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience
- SGLang
How to use Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience 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 "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience" \ --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": "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience", "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 "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience" \ --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": "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience with Docker Model Runner:
docker model run hf.co/Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience
LDM-CoT-SFT-Qwen3.5-9B-MixedScience
A Qwen/Qwen3.5-9B proposer for Large Discovery Models (LDM), trained as the
GP-hidden (value-to-language) variant: the surrogate's numerical acquisition values are
withheld from the prompt, so the model must infer the epistemic state — which regions are
exhausted, which remain uncertain or informative, and whether to exploit or explore — from
the observed experience alone.
Model Summary
An LDM runs a recurrent generate → select → evaluate → update loop in which an LLM
proposes candidates, a probabilistic surrogate turns observations into a posterior mean and
uncertainty, and an acquisition function selects the next experiment. This model is the
proposer. It differs from the companion
LDM-SFT-Qwen3.5-9B-MixedScience
in one respect: the Gaussian-process values are not shown in the prompt during training,
which forces the acquisition reasoning to be reconstructed from the raw history in natural
language rather than read off surrogate numbers. It emits a chain-of-thought trace followed
by a structured action.
- Base model:
Qwen/Qwen3.5-9B - Chat template:
qwen3_5(chain-of-thought / thinking enabled) - Training data: LDM-CoT-SFT-16K (GP values hidden)
Why hide the GP values
Withholding the surrogate values makes training consistent with deployment, where the acquisition loop exposes no GP numbers to the proposer, and encourages a task-agnostic search intuition that lives in the weights rather than in a numeric input. In practice the acquisition reasoning is barely affected — even when GP values are provided, the reasoning overwhelmingly draws on the observed outcomes (stall length, noise level, best-so-far) rather than on the surrogate numbers.
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Yangtze-ailab/LDM-CoT-SFT-Qwen3.5-9B-MixedScience"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, torch_dtype="bfloat16", device_map="auto", trust_remote_code=True)
messages = [
{"role": "system", "content": SYSTEM_PROMPT}, # proposer role + output contract
{"role": "user", "content": SEARCH_STATE}, # evaluated history + constraints (no GP values)
]
inputs = tok.apply_chat_template(
messages, add_generation_prompt=True, enable_thinking=True, return_tensors="pt"
).to(model.device)
out = model.generate(inputs, max_new_tokens=2048, temperature=0.7)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Training
Full-parameter SFT of Qwen/Qwen3.5-9B (DeepSpeed ZeRO-3 with CPU offload, bf16, gradient
checkpointing), sequence length 16,384, learning rate 1e-5 with a cosine schedule and 0.03
warmup ratio, 2 epochs; framework LLaMA-Factory. Chat template qwen3_5 with thinking
enabled. The reasoning targets are in English.
Related
- LDM-SFT-Qwen3.5-9B-MixedScience — companion proposer trained with GP values shown in the prompt.
- Datasets: LDM-CoT-SFT-16K (GP hidden), LDM-CoT-Acq-SFT-16K (GP shown), LDM-TTS-Base-SFT-19K (no reasoning).
Limitations
- Designed to operate inside the LDM loop; standalone it proposes candidates but does not evaluate them.
- Behaviour reflects the oracles used during data collection and the covered domains.
License
Released under the MIT license. The base model Qwen/Qwen3.5-9B remains subject to its own license terms.
- Downloads last month
- 14