Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use liangyuch/ot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liangyuch/ot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liangyuch/ot") 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("liangyuch/ot") model = AutoModelForCausalLM.from_pretrained("liangyuch/ot", 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 liangyuch/ot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liangyuch/ot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liangyuch/ot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/liangyuch/ot
- SGLang
How to use liangyuch/ot 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 "liangyuch/ot" \ --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": "liangyuch/ot", "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 "liangyuch/ot" \ --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": "liangyuch/ot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use liangyuch/ot with Docker Model Runner:
docker model run hf.co/liangyuch/ot
Training in progress, epoch 1
Browse filesFiles changed (6)
123version https://git-lfs.github.com/spec/v1oid sha256:8a338c1cb936e654dd29621844af7ac4715d9d77b65604045a2af353745daba6size 4877660776123version https://git-lfs.github.com/spec/v1oid sha256:ffbee8ee01438508d962a7e8a2c4af9ed05a13d769a8f57b28881fd99a0c93e2size 4877660776
123version https://git-lfs.github.com/spec/v1oid sha256:a9337450fe5cfd7122609073ab1edc45e2ef6d7115034bbc33423d1b98f3cca4size 4932751008123version https://git-lfs.github.com/spec/v1oid sha256:a0259a43b0e15205ae4688d57d3921fd4319a686683aa510da4c663db0b227basize 4932751008
123version https://git-lfs.github.com/spec/v1oid sha256:41595ebd08f0043a924294d480691b42ad584730b0d332b76e4cd7e422a5795esize 4330865200123version https://git-lfs.github.com/spec/v1oid sha256:741ea391dc96750a2bab25230ff86810d746a0ee88e8c083b1bfda71e0264680size 4330865200
123version https://git-lfs.github.com/spec/v1oid sha256:e1d3b827589620eecabc0046deb637119e1e0fd7ebf049142ad5da21af8002e8size 1089994880123version https://git-lfs.github.com/spec/v1oid sha256:ff08aad90a4d576aa90c61b9113151138cb0ef7f519de2fdca76b70756919fe0size 1089994880
123version https://git-lfs.github.com/spec/v1oid sha256:235fd1cae07728427baf75d4fae5cda17b7ce3b67e57804216cd6151eccd72desize 7672123version https://git-lfs.github.com/spec/v1oid sha256:8734ac05e162480a14bd0143d0bdf9e09e115239fd3e869fb8572e3f6dbb749fsize 7672
model-00001-of-00004.safetensors+1-1
model-00002-of-00004.safetensors+1-1
model-00003-of-00004.safetensors+1-1
model-00004-of-00004.safetensors+1-1
trainer_log.jsonl
training_args.bin+1-1