Jackrong/DeepSeek-V4.1-Flash-Nemotron-Competitive-Coding-Distill
Viewer โข Updated โข 6.1k โข 1.61k โข 184
Run ahpah/DeepSeek-V4.1-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs and TRL to fine-tune https://huggingface.co/ahpah/DeepSeek-V4.1-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/ahpah/DeepSeek-V4.1-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to evaluate https://huggingface.co/ahpah/DeepSeek-V4.1-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to create a 4-bit version of https://huggingface.co/ahpah/DeepSeek-V4.1-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use ahpah/DeepSeek-V4.1-4B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="ahpah/DeepSeek-V4.1-4B") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("ahpah/DeepSeek-V4.1-4B", device_map="auto")How to use ahpah/DeepSeek-V4.1-4B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ahpah/DeepSeek-V4.1-4B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ahpah/DeepSeek-V4.1-4B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ahpah/DeepSeek-V4.1-4B
How to use ahpah/DeepSeek-V4.1-4B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ahpah/DeepSeek-V4.1-4B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ahpah/DeepSeek-V4.1-4B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "ahpah/DeepSeek-V4.1-4B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ahpah/DeepSeek-V4.1-4B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ahpah/DeepSeek-V4.1-4B with Docker Model Runner:
docker model run hf.co/ahpah/DeepSeek-V4.1-4B
DeepSeek-V4.1-4B is a competitive-coding reasoning fine-tune of saidutta69/Qwen3.5-4B-heretic (an abliterated/uncensored variant of Qwen/Qwen3.5-4B) trained on Jackrong/DeepSeek-V4.1-Flash-Nemotron-Competitive-Coding-Distill.
It emits structured <think>...</think> reasoning traces followed by implementation code for algorithmic and competitive programming tasks.
Q6_K): ahpah/DeepSeek-V4.1-4B-GGUFr=16, lora_alpha=16, lora_dropout=0, BF16 compute, completion-only loss) merged into BF16 weightsq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, in_proj_qkv, in_proj_z, out_proj2,091 / 6,095 complete reasoning + solution traces fitting within max_length=40961 epoch (262 steps, per_device_train_batch_size=1, gradient_accumulation_steps=8, lr=1e-4 cosine, warmup_steps=25, paged_adamw_8bit)train_loss = 0.9409, mean_token_accuracy = 72.5%transformers)
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "ahpah/DeepSeek-V4.1-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
messages = [
{"role": "user", "content": "Write an efficient Python solution for maximum subarray sum."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1536, temperature=0.6, top_p=0.95)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))