Text Generation
Transformers
Safetensors
Chinese
qwen2
medical
conversational
text-generation-inference
Instructions to use SylvanL/ChatTCM-7B-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SylvanL/ChatTCM-7B-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SylvanL/ChatTCM-7B-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("SylvanL/ChatTCM-7B-SFT") model = AutoModelForCausalLM.from_pretrained("SylvanL/ChatTCM-7B-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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SylvanL/ChatTCM-7B-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SylvanL/ChatTCM-7B-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": "SylvanL/ChatTCM-7B-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SylvanL/ChatTCM-7B-SFT
- SGLang
How to use SylvanL/ChatTCM-7B-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 "SylvanL/ChatTCM-7B-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": "SylvanL/ChatTCM-7B-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 "SylvanL/ChatTCM-7B-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": "SylvanL/ChatTCM-7B-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SylvanL/ChatTCM-7B-SFT with Docker Model Runner:
docker model run hf.co/SylvanL/ChatTCM-7B-SFT
Commit History
-
Update README.md
Verified signatureaf1efca
-
Update config.json
Verified signaturecbf1a3d -
Upload 15 files
Verified signature15a7b0b -
Upload 4 files
Verified signaturereplace epoch 1 with epoch 2cfc6950 -
Update README.md
Verified signature3804511 -
Update README.md
Verified signatureac74097 -
Upload training_loss_epoch2.png
Verified signaturefc18876 -
Delete special_tokens_map.json
Verified signaturecc35494 -
Delete model.safetensors.index.json
Verified signatureb8988d4 -
Delete model-00006-of-00006.safetensors
Verified signature0a42b0c -
Delete model-00005-of-00006.safetensors
Verified signature7e3d993 -
Delete model-00004-of-00006.safetensors
Verified signaturef9b14f5 -
Delete model-00003-of-00006.safetensors
Verified signatureca2a2e8 -
Delete merges.txt
Verified signature7ef86eb -
Delete model-00002-of-00006.safetensors
Verified signatureb53b696 -
Delete model-00001-of-00006.safetensors
Verified signaturec7edabc -
Delete config.json
Verified signature26c0002 -
Delete added_tokens.json
Verified signaturec4b371d -
Delete tokenizer.json
Verified signatureefcc6c2 -
Delete tokenizer_config.json
Verified signatureb010cae -
Delete vocab.json
Verified signature44ce1dd
-
Update README.md
Verified signature8b68883 -
Update README.md
Verified signature0211529 -
Update README.md
Verified signature3b2ebbc
-
Update README.md
Verified signatured25ca12
-
Update README.md
Verified signature9bd56ac -
Update README.md
Verified signaturedbdea37
-
Update README.md
Verified signature8af0c4b -
Update README.md
Verified signaturee049e31 -
Update README.md
Verified signature088b022
-
Update README.md
Verified signature3d4748b -
Update README.md
Verified signature361a18a -
Update README.md
Verified signature6f9ed48 -
Rename training_loss.png to training_loss_epoch1.png
Verified signatureeb3fefa -
Update README.md
Verified signature6c88985 -
Update README.md
Verified signature8c7b7f9 -
Update README.md
Verified signature2d6bdc5 -
Update README.md
Verified signature8421d5c -
Update README.md
Verified signature3b2cb06 -
Upload training_loss.png
Verified signature0604f9c -
Upload training_loss.png
Verified signature17ab0ba -
Update README.md
Verified signature2bc4477 -
Update README.md
Verified signature4e08d3a -
Update README.md
Verified signaturee033d13
-
Update README.md
Verified signaturecea0829 -
Update README.md
Verified signature2f8bb36
-
Update README.md
Verified signature57e3428 -
Update README.md
Verified signature749cb5f -
Upload tokenizer
Verified signaturea5234dd -
Upload model
Verified signaturee918e8b