Text Generation
Transformers
Safetensors
English
qwen3
surfdoc
fine-tuned
conversational
text-generation-inference
Instructions to use brady777/surfdoc-8b-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brady777/surfdoc-8b-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="brady777/surfdoc-8b-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("brady777/surfdoc-8b-v1") model = AutoModelForCausalLM.from_pretrained("brady777/surfdoc-8b-v1") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use brady777/surfdoc-8b-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "brady777/surfdoc-8b-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": "brady777/surfdoc-8b-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/brady777/surfdoc-8b-v1
- SGLang
How to use brady777/surfdoc-8b-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 "brady777/surfdoc-8b-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": "brady777/surfdoc-8b-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 "brady777/surfdoc-8b-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": "brady777/surfdoc-8b-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use brady777/surfdoc-8b-v1 with Docker Model Runner:
docker model run hf.co/brady777/surfdoc-8b-v1
SurfDoc AI (surfdoc:8b v1)
Fine-tuned Qwen3-8B for generating structurally valid SurfDoc (.surf) documents.
Model Details
- Base model: Qwen/Qwen3-8B
- Method: QLoRA (rank 32, 87M trainable params, 1.05% of model)
- Training data: 9,241 instruction-output pairs from 26 CloudSurf repositories
- Training hardware: NVIDIA GB10 (Blackwell), 128GB unified memory
- Training time: 5.7 hours (235 steps, Flash Attention 2 enabled)
- Framework: Unsloth 2026.3.4 + PyTorch 2.10 + CUDA 12.8
What it generates
Valid SurfDoc documents with:
- YAML frontmatter (title, type, version, status, tags)
- Typed block directives (::summary, ::callout, ::data, ::action-items)
- Markdown headings and structured content
- Correct formatting and syntax
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("brady777/surfdoc-8b-v1")
tokenizer = AutoTokenizer.from_pretrained("brady777/surfdoc-8b-v1")
messages = [
{"role": "system", "content": "You are SurfDoc AI. Generate valid SurfDoc documents."},
{"role": "user", "content": "Create a SurfDoc plan about improving website performance"},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs.input_ids, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True))
Evaluation
Evaluated on 20 diverse SurfDoc generation prompts:
- Average score: 79%
- Has title: 70% | Has type: 60% | Has headings: 75%
- Uses blocks: 55% | Blocks closed: 100%
- No repetition: 95% | Good length: 100%
Note
Qwen3 is a reasoning model — outputs include <think> tags before the actual response. Strip these before display:
import re
response = re.sub(r'<think>.*?</think>', '', response, flags=re.DOTALL).strip()
Built by
- Downloads last month
- 7