Instructions to use flyingfishinwater/tinystories_zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flyingfishinwater/tinystories_zh with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flyingfishinwater/tinystories_zh")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flyingfishinwater/tinystories_zh") model = AutoModelForCausalLM.from_pretrained("flyingfishinwater/tinystories_zh") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flyingfishinwater/tinystories_zh with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flyingfishinwater/tinystories_zh" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flyingfishinwater/tinystories_zh", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/flyingfishinwater/tinystories_zh
- SGLang
How to use flyingfishinwater/tinystories_zh 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 "flyingfishinwater/tinystories_zh" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flyingfishinwater/tinystories_zh", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "flyingfishinwater/tinystories_zh" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flyingfishinwater/tinystories_zh", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use flyingfishinwater/tinystories_zh with Docker Model Runner:
docker model run hf.co/flyingfishinwater/tinystories_zh
Commit History
Upload tencent.html 8d95aab verified
Update README.md 6ec60ff
Qi Wang commited on
Update README.md 7d55cd5
Qi Wang commited on
Update README.md 70fb6e9
Qi Wang commited on
Update README.md 216c7a2
Qi Wang commited on
Update README.md ef492cf
Qi Wang commited on
Update README.md 3d59e29
Qi Wang commited on
Upload 3 files 87e5187
Qi Wang commited on
Upload 2 files c047477
Qi Wang commited on
Upload pytorch_model.bin a14159d
Qi Wang commited on
Upload pytorch_model.bin 431e00a
Qi Wang commited on
Upload pytorch_model.bin d1c3077
Qi Wang commited on
Update README.md 911dfe3
Qi Wang commited on
Upload llama2c-93MB.bin 22c830f
Qi Wang commited on
Update README.md d73ef17
Qi Wang commited on
Upload 7 files 9f24f99
Qi Wang commited on