Instructions to use marianna13/prelude-9b-midtrain-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marianna13/prelude-9b-midtrain-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marianna13/prelude-9b-midtrain-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("marianna13/prelude-9b-midtrain-v1") model = AutoModelForCausalLM.from_pretrained("marianna13/prelude-9b-midtrain-v1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marianna13/prelude-9b-midtrain-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marianna13/prelude-9b-midtrain-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marianna13/prelude-9b-midtrain-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marianna13/prelude-9b-midtrain-v1
- SGLang
How to use marianna13/prelude-9b-midtrain-v1 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 "marianna13/prelude-9b-midtrain-v1" \ --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": "marianna13/prelude-9b-midtrain-v1", "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 "marianna13/prelude-9b-midtrain-v1" \ --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": "marianna13/prelude-9b-midtrain-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use marianna13/prelude-9b-midtrain-v1 with Docker Model Runner:
docker model run hf.co/marianna13/prelude-9b-midtrain-v1
Prelude 9B mid-train v1 โ stage4-128k-step1001
Long-context mid-training of the Prelude 9B base (Qwen3 architecture, vocab 262,272), trained with Megatron on
MareNostrum 5 and exported to Hugging Face format. Source checkpoint: prelude-9b-midtrain-v1-stage4-128k-yarn2-step1001.
This revision: 128K, YaRN x2 over 64K, RoPE theta 9M. Short 128K stage from stage 3 with YaRN x2 applied in training: 8,012 rows / 1.0B seen tokens, 1001 steps.
Each stage is a separate revision (branch) of this repo; main is the final stage (stage 4):
| Revision | Context | |
|---|---|---|
stage1-16k-step607 |
16K (max_position 65536), RoPE theta 9M | |
stage2-32k-step1821 |
32K (max_position 65536), RoPE theta 9M | |
stage3-64k-step4419 |
64K (max_position 65536), RoPE theta 9M | |
stage4-128k-step1001 |
128K, YaRN x2 over 64K, RoPE theta 9M | this revision |
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("marianna13/prelude-9b-midtrain-v1", revision="stage4-128k-step1001", torch_dtype="bfloat16")
This is a base (not chat-tuned) model; it needs the BOS token. The chat template in the repo is the Prelude ChatML template used for later SFT.
- Downloads last month
- -