Text Generation
Transformers
TensorBoard
Safetensors
qwen2
trl
sft
conversational
text-generation-inference
Run this model with HF Jobs
Run anirudhb11/sft 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:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/anirudhb11/sft. 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.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/anirudhb11/sft 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.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/anirudhb11/sft. 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.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/anirudhb11/sft. 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.
Instructions to use anirudhb11/sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anirudhb11/sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anirudhb11/sft") 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("anirudhb11/sft") model = AutoModelForCausalLM.from_pretrained("anirudhb11/sft", 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 anirudhb11/sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anirudhb11/sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anirudhb11/sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/anirudhb11/sft
- SGLang
How to use anirudhb11/sft 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 "anirudhb11/sft" \ --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": "anirudhb11/sft", "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 "anirudhb11/sft" \ --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": "anirudhb11/sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use anirudhb11/sft with Docker Model Runner:
docker model run hf.co/anirudhb11/sft
Training in progress, step 40
Browse filesFiles changed (4)
22 unmodified lines232425262728293022 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["q_proj","v_proj"],"task_type": "CAUSAL_LM","use_dora": false,22 unmodified lines232425262728293022 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["v_proj","q_proj"],"task_type": "CAUSAL_LM","use_dora": false,
123version https://git-lfs.github.com/spec/v1oid sha256:af8bb46356213c2830387847a559758db8c1c554fc91a685c6b1c59754d97bfdsize 17447528123version https://git-lfs.github.com/spec/v1oid sha256:19f89920faff7749f6500f41c5267a7a766ac431c60f0e5bff51befced782998size 17447528
123version https://git-lfs.github.com/spec/v1oid sha256:f36498775b13ad8036fe5cf2cb369949a3d045972d0dc7e7012b4efb8a0f150csize 8422123version https://git-lfs.github.com/spec/v1oid sha256:2696e12c76d67c4b2c1b052484723ccef394b24ebe6c84c73aa26a8bac19493esize 5624123version https://git-lfs.github.com/spec/v1oid sha256:7d7454dfbad6e0614c5a43020eeaad0cf184d4cc013654721edbd582e91ccc06size 5624
adapter_config.json+2-2
adapter_model.safetensors+1-1
runs/Apr11_23-10-24_cn-l079.server.mila.quebec/events.out.tfevents.1744427481.cn-l079.server.mila.quebec.397277.0Added+3
training_args.bin+1-1