Text Generation
Transformers
Safetensors
sdar
feature-extraction
diffusion-language-model
reinforcement-learning
mathematical-reasoning
remasking
drpo
conversational
custom_code
Eval Results (legacy)
Instructions to use Leotsia/DRPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Leotsia/DRPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Leotsia/DRPO", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Leotsia/DRPO", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Leotsia/DRPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Leotsia/DRPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Leotsia/DRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Leotsia/DRPO
- SGLang
How to use Leotsia/DRPO 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 "Leotsia/DRPO" \ --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": "Leotsia/DRPO", "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 "Leotsia/DRPO" \ --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": "Leotsia/DRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Leotsia/DRPO with Docker Model Runner:
docker model run hf.co/Leotsia/DRPO
| { | |
| "architectures": [ | |
| "SDARForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "auto_map": { | |
| "AutoConfig": "configuration_sdar.SDARConfig", | |
| "AutoModel": "modeling_sdar.SDARForCausalLM", | |
| "AutoModelForCausalLM": "modeling_sdar.SDARForCausalLM" | |
| }, | |
| "block_size": 4, | |
| "bos_token_id": 151643, | |
| "debug": false, | |
| "eos_token_id": 151643, | |
| "ep_size": 1, | |
| "fuse_cross_entropy": true, | |
| "gap_curriculum_enable": true, | |
| "gap_curriculum_min_coupling": 0.25, | |
| "gap_curriculum_warmup_ratio": 0.15, | |
| "gap_diffusion_loss_weight": 0.0, | |
| "gap_enable": true, | |
| "gap_global_loss_weight": 0.0, | |
| "gap_grpo_action_granularity": "threshold", | |
| "gap_grpo_advantage_eps": 0.0001, | |
| "gap_grpo_anchor_bias_power": 2.0, | |
| "gap_grpo_branch_debug_interval": 5, | |
| "gap_grpo_branch_debug_max_branches": 0, | |
| "gap_grpo_branch_debug_max_chars": 600, | |
| "gap_grpo_branch_debug_max_examples": 1, | |
| "gap_grpo_branch_debug_once": false, | |
| "gap_grpo_candidate_window_blocks": 4, | |
| "gap_grpo_clip_eps": 0.15, | |
| "gap_grpo_correct_threshold": 0.5, | |
| "gap_grpo_dense_reward_weight": 0.2, | |
| "gap_grpo_diverse_rollbacks": false, | |
| "gap_grpo_entropy_coef": 0.05, | |
| "gap_grpo_fixed_visible_blocks": true, | |
| "gap_grpo_format_reward_weight": 0.0, | |
| "gap_grpo_initial_rollout_temperature": 0.9, | |
| "gap_grpo_kl_coef": 0.02, | |
| "gap_grpo_loss_weight": 0.35, | |
| "gap_grpo_max_correct_count": -1, | |
| "gap_grpo_min_correct_count": 1, | |
| "gap_grpo_min_visible_blocks": 3, | |
| "gap_grpo_mixed_terminal_filter": false, | |
| "gap_grpo_num_parents": 1, | |
| "gap_grpo_num_samples": 8, | |
| "gap_grpo_ref_model_path": "/work/leotsia0416/projects/SDAR/training/model/SDAR-1.7B-Chat", | |
| "gap_grpo_remask_penalty": 0.0, | |
| "gap_grpo_rollout_temperature": 0.9, | |
| "gap_grpo_rollout_top_k": 128, | |
| "gap_grpo_rollout_top_p": 0.98, | |
| "gap_grpo_sample_prob_eps": 0.0001, | |
| "gap_grpo_sft_ce_weight": 0.0, | |
| "gap_grpo_terminal_reward_weight": 2.0, | |
| "gap_grpo_terminal_rollout_scope": "all", | |
| "gap_grpo_terminal_rollout_strategy": "low_confidence_dynamic", | |
| "gap_grpo_use_baseline_branch": false, | |
| "gap_grpo_value_baseline_weight": 0.0, | |
| "gap_grpo_value_loss_weight": 0.0, | |
| "gap_loss_scope": "all", | |
| "gap_min_reveal_tokens": 1, | |
| "gap_noisy_context_loss_weight": 0.05, | |
| "gap_projected_aux_loss_weight": 0.0, | |
| "gap_remask_adv_max_candidates": 1, | |
| "gap_remask_adv_warmup_ratio": 0.1, | |
| "gap_remask_default_p_mask": 1.0, | |
| "gap_remask_loss_weight": 0.0, | |
| "gap_remask_stage_mode": "two_stage", | |
| "gap_remask_supervision": "adv_bce", | |
| "gap_remask_threshold": 0.45, | |
| "gap_reveal_ratio": 0.25, | |
| "gap_rollout_confidence_threshold": 0.92, | |
| "gap_rollout_scope": "frontier_block", | |
| "gap_rollout_steps": 3, | |
| "gap_rollout_strategy": "sequential", | |
| "gap_training_mode": "remask", | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6144, | |
| "mask_token_id": 151669, | |
| "max_position_embeddings": 32768, | |
| "max_window_layers": 28, | |
| "micro_forward": false, | |
| "model_type": "sdar", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 28, | |
| "num_key_value_heads": 8, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": null, | |
| "rope_theta": 1000000, | |
| "skip_checkpoint": false, | |
| "sliding_window": null, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.52.4", | |
| "use_cache": false, | |
| "use_deepep": false, | |
| "use_sliding_window": false, | |
| "vocab_size": 151936 | |
| } | |