Instructions to use ar08/TINYLLAMA-LAPTOP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ar08/TINYLLAMA-LAPTOP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ar08/TINYLLAMA-LAPTOP") 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("ar08/TINYLLAMA-LAPTOP") model = AutoModelForCausalLM.from_pretrained("ar08/TINYLLAMA-LAPTOP", 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 ar08/TINYLLAMA-LAPTOP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ar08/TINYLLAMA-LAPTOP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ar08/TINYLLAMA-LAPTOP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ar08/TINYLLAMA-LAPTOP
- SGLang
How to use ar08/TINYLLAMA-LAPTOP 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 "ar08/TINYLLAMA-LAPTOP" \ --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": "ar08/TINYLLAMA-LAPTOP", "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 "ar08/TINYLLAMA-LAPTOP" \ --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": "ar08/TINYLLAMA-LAPTOP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ar08/TINYLLAMA-LAPTOP with Docker Model Runner:
docker model run hf.co/ar08/TINYLLAMA-LAPTOP
Commit History
-
Training in progress, epoch 25
Verified signature325a659 -
Training in progress, epoch 24
Verified signatureae78ddb -
Training in progress, epoch 24
Verified signaturea0470fd -
Training in progress, epoch 22
Verified signatureab7ad72 -
Training in progress, epoch 21
Verified signatured7aac5d -
Training in progress, epoch 20
Verified signature73fb733 -
Training in progress, epoch 20
Verified signatureb2358d9 -
Training in progress, epoch 18
Verified signature594844e -
Training in progress, epoch 17
Verified signature08382b3 -
Training in progress, epoch 16
Verified signature4270af4 -
Training in progress, epoch 16
Verified signaturedaa3ce4 -
Training in progress, epoch 14
Verified signature1083d21 -
Training in progress, epoch 13
Verified signature5d1694d -
Training in progress, epoch 12
Verified signature3980591 -
Training in progress, epoch 12
Verified signature9b7ad4b -
Training in progress, epoch 10
Verified signature4ae09ef -
Training in progress, epoch 9
Verified signaturee7189da -
Training in progress, epoch 8
Verified signaturef68ad3f -
Training in progress, epoch 8
Verified signature18e3346 -
Training in progress, epoch 6
Verified signature04e499e -
Training in progress, epoch 5
Verified signature4c8c7d8 -
Training in progress, epoch 4
Verified signatureca88e2c -
Training in progress, epoch 4
Verified signature13ba535 -
Training in progress, epoch 2
Verified signature42b26a5 -
Training in progress, epoch 1
Verified signature22e86de