Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
trl
unsloth
sft
conversational
text-generation-inference
Instructions to use Ba2han/m-sft-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/m-sft-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ba2han/m-sft-2") 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("Ba2han/m-sft-2") model = AutoModelForCausalLM.from_pretrained("Ba2han/m-sft-2", 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 Ba2han/m-sft-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/m-sft-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/m-sft-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ba2han/m-sft-2
- SGLang
How to use Ba2han/m-sft-2 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 "Ba2han/m-sft-2" \ --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": "Ba2han/m-sft-2", "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 "Ba2han/m-sft-2" \ --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": "Ba2han/m-sft-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Ba2han/m-sft-2 with Docker Model Runner:
docker model run hf.co/Ba2han/m-sft-2
Commit History
-
Training in progress, step 2994
Verified signaturea8b4102 -
Training in progress, step 2952
Verified signature590595c -
Training in progress, step 2880
Verified signature90bc898 -
Training in progress, step 2808
Verified signaturec7c7fac -
Training in progress, step 2736
Verified signature644c9b4 -
Training in progress, step 2664
Verified signature4a512ae -
Training in progress, step 2592
Verified signature112ecab -
Training in progress, step 2520
Verified signature8e1b28c -
Training in progress, step 2448
Verified signaturec826a9b -
Training in progress, step 2376
Verified signatured0a5066 -
Training in progress, step 2304
Verified signaturee4cda68 -
Training in progress, step 2232
Verified signaturef8a81fa -
Training in progress, step 2160
Verified signature0ad8160 -
Training in progress, step 2088
Verified signature9dde80b -
Training in progress, step 2016
Verified signaturedbc512c -
Training in progress, step 1944
Verified signaturec6e2d44 -
Training in progress, step 1872
Verified signature8578e20 -
Training in progress, step 1800
Verified signaturee397414 -
Training in progress, step 1728
Verified signature470aaf9 -
Training in progress, step 1656
Verified signature0a21abe -
Training in progress, step 1584
Verified signature611f37f -
Training in progress, step 1512
Verified signatureb454fb7 -
Training in progress, step 1440
Verified signature70a5843 -
Training in progress, step 1368
Verified signature1a12426 -
Training in progress, step 1296
Verified signatureb72427e -
Training in progress, step 1224
Verified signature597528d -
Training in progress, step 1152
Verified signature0576887 -
Training in progress, step 1080
Verified signature3f11a7c -
Training in progress, step 1008
Verified signature6baa2f7 -
Training in progress, step 936
Verified signatured84abfb -
Training in progress, step 864
Verified signature95595cf -
Training in progress, step 792
Verified signature40e7c43 -
Training in progress, step 720
Verified signature36ac2c6 -
Training in progress, step 648
Verified signature4ae4d4b -
Training in progress, step 576
Verified signaturec802318 -
Training in progress, step 504
Verified signatured2f392d -
Training in progress, step 432
Verified signaturec8c5eab -
Training in progress, step 360
Verified signature09e1d0a -
Training in progress, step 288
Verified signature16dc945 -
Training in progress, step 216
Verified signaturebf42547 -
Training in progress, step 144
Verified signatureefdd85f -
Training in progress, step 72
Verified signaturefa28137 -
Training in progress, step 72, checkpoint
Verified signature0e6bb88 -
Training in progress, step 72
Verified signature4aa1eb1 -
initial commit
Verified signature6ca37fc