Instructions to use Corianas/tiny-llama-miniguanaco-1.5T with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Corianas/tiny-llama-miniguanaco-1.5T with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Corianas/tiny-llama-miniguanaco-1.5T")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Corianas/tiny-llama-miniguanaco-1.5T") model = AutoModelForCausalLM.from_pretrained("Corianas/tiny-llama-miniguanaco-1.5T") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Corianas/tiny-llama-miniguanaco-1.5T with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Corianas/tiny-llama-miniguanaco-1.5T" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Corianas/tiny-llama-miniguanaco-1.5T", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Corianas/tiny-llama-miniguanaco-1.5T
- SGLang
How to use Corianas/tiny-llama-miniguanaco-1.5T 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 "Corianas/tiny-llama-miniguanaco-1.5T" \ --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": "Corianas/tiny-llama-miniguanaco-1.5T", "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 "Corianas/tiny-llama-miniguanaco-1.5T" \ --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": "Corianas/tiny-llama-miniguanaco-1.5T", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Corianas/tiny-llama-miniguanaco-1.5T with Docker Model Runner:
docker model run hf.co/Corianas/tiny-llama-miniguanaco-1.5T
TinyLLama 1.5T checkpoint trained to answer questions.
f"{'prompt'}\n{'completion'}\n<END>"
No special formatting, just question, then newline to begin the answer.
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
pipe = pipeline("text-generation", model="Corianas/tiny-llama-miniguanaco-1.5T")# Load model directly
tokenizer = AutoTokenizer.from_pretrained("Corianas/tiny-llama-miniguanaco-1.5T")
model = AutoModelForCausalLM.from_pretrained("Corianas/tiny-llama-miniguanaco-1.5T")
# Run text generation pipeline with our next model
prompt = "What is a large language model?"
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=500)
result = pipe(f"<s>{prompt}")
print(result[0]['generated_text'])
Result will have the answer, ending with <END> on a new line.
- Downloads last month
- 840