Text Generation
Transformers
Safetensors
glm4
eklav
math-reasoning
cot-distillation
reasoning
cotgen
conversational
Instructions to use AdarshSingh7647/Eklav-9B-Math-CotGen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdarshSingh7647/Eklav-9B-Math-CotGen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AdarshSingh7647/Eklav-9B-Math-CotGen") 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("AdarshSingh7647/Eklav-9B-Math-CotGen") model = AutoModelForCausalLM.from_pretrained("AdarshSingh7647/Eklav-9B-Math-CotGen", 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 AdarshSingh7647/Eklav-9B-Math-CotGen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdarshSingh7647/Eklav-9B-Math-CotGen" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdarshSingh7647/Eklav-9B-Math-CotGen", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AdarshSingh7647/Eklav-9B-Math-CotGen
- SGLang
How to use AdarshSingh7647/Eklav-9B-Math-CotGen 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 "AdarshSingh7647/Eklav-9B-Math-CotGen" \ --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": "AdarshSingh7647/Eklav-9B-Math-CotGen", "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 "AdarshSingh7647/Eklav-9B-Math-CotGen" \ --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": "AdarshSingh7647/Eklav-9B-Math-CotGen", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AdarshSingh7647/Eklav-9B-Math-CotGen with Docker Model Runner:
docker model run hf.co/AdarshSingh7647/Eklav-9B-Math-CotGen
Rebrand to Eklav: rewrite model card
Browse files1 unmodified line2345678910111213141516171819201 unmodified linebase_model: zai-org/GLM-Z1-9B-0414library_name: transformerstags:- hetu- mathreasoning- cotgen---# HETU-GLM-Z1-9B-MathReasoning-CotGenPart of the **HETU (Hints Enable True Understanding)** model suite.- **Base model:** [zai-org/GLM-Z1-9B-0414](https://huggingface.co/zai-org/GLM-Z1-9B-0414)- **Task:** math reasoning (AIME, GSM8K, MATH-500, Omni-MATH, GPQA-Diamond, MMLU)- **Method:** trained to generate a full chain-of-thought before producing its output (CotGen)This is the full merged model (base weights + LoRA adapter merged in), final training checkpoint, in bf16.See the HETU paper for the training setup, evaluation methodology, and results tables.1 unmodified line234567891011121314151617181920212223242526272829303132333435363738394041424344451 unmodified linebase_model: zai-org/GLM-Z1-9B-0414library_name: transformerstags:- eklav- math-reasoning- cot-distillation- reasoning- cotgen---# Eklav-9B-Math-CotGen (CotGen baseline)Eklav trains a model to pick up a teacher's reasoning mid thought rather than imitate it end to end. The student sees a partial reasoning trace from the teacher, with the answer revealing tail removed, and learns to continue reasoning and produce the answer on its own. The model's own reasoning is conditioned on the teacher's partial trace during training rather than trained to reproduce it word for word. Same base model, same training data as standard full trace CoT distillation, only the training objective changes.## Highlights- Standard full trace CoT SFT baseline used to measure Eklav's improvement at this scale## Model details| | ||---|---|| Base model | [zai-org/GLM-Z1-9B-0414](https://huggingface.co/zai-org/GLM-Z1-9B-0414) || Task | Math reasoning || Training method | CotGen (standard full trace CoT SFT, baseline) || Format | Merged bf16 checkpoint |## ResultsPass@1 (%), single evaluation run per benchmark.| Benchmark | AIME 2025 | AIME 1983-2024 | GPQA-Diamond | GSM8K | MATH-500 | Omni-MATH | MMLU ||---|---|---|---|---|---|---|---|| CotGen | 35.2 | 59.3 | 49.8 | 95.5 | 91.2 | 39.8 | 81.0 |## Usage```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizermodel_id = "AdarshSingh7647/Eklav-9B-Math-CotGen"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")```
README.md+34-9