Reasoning Models
Collection
Chain of Thought • 11 items • Updated • 2
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 "khazarai/Scie-R1" \
--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": "khazarai/Scie-R1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'This fine-tuned model is designed for:
It is not intended to replace human researchers, perform advanced analytics, or generate novel scientific discoveries.
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("khazarai/Scie-R1")
model = AutoModelForCausalLM.from_pretrained(
"khazarai/Scie-R1",
device_map={"": 0}
)
question = """
How are microfluidic devices revolutionizing laboratory analysis techniques, and what are the primary advantages they offer over traditional methods?
"""
messages = [
{"role" : "user", "content" : question}
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
enable_thinking = True,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 1800,
temperature = 0.6,
top_p = 0.95,
top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
Scope
This model was fine-tuned on tasks that involve core scientific reasoning:
Illustrative Examples
Emphasis on Chain-of-Thought (CoT)
Focus on Foundational Knowledge
The dataset aims to strengthen models in foundational scientific reasoning skills rather than covering all domains of scientific knowledge.
Dataset: moremilk/CoT_Reasoning_Scientific_Discovery_and_Research
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "khazarai/Scie-R1" \ --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": "khazarai/Scie-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'