Instructions to use LoneWolfgang/tinyllama-for-abalone-RAG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LoneWolfgang/tinyllama-for-abalone-RAG with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LoneWolfgang/tinyllama-for-abalone-RAG") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LoneWolfgang/tinyllama-for-abalone-RAG") model = AutoModelForCausalLM.from_pretrained("LoneWolfgang/tinyllama-for-abalone-RAG") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LoneWolfgang/tinyllama-for-abalone-RAG with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LoneWolfgang/tinyllama-for-abalone-RAG" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LoneWolfgang/tinyllama-for-abalone-RAG", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LoneWolfgang/tinyllama-for-abalone-RAG
- SGLang
How to use LoneWolfgang/tinyllama-for-abalone-RAG 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 "LoneWolfgang/tinyllama-for-abalone-RAG" \ --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": "LoneWolfgang/tinyllama-for-abalone-RAG", "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 "LoneWolfgang/tinyllama-for-abalone-RAG" \ --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": "LoneWolfgang/tinyllama-for-abalone-RAG", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LoneWolfgang/tinyllama-for-abalone-RAG with Docker Model Runner:
docker model run hf.co/LoneWolfgang/tinyllama-for-abalone-RAG
TinyLlama for Abalone RAG
This is a toy model fine-tuned specifically for the Abalone RAG App. A dataset was developed to finetune this model:
- Questions were suggested by GPT-5.
- Passages were retrieved from a small index created for the app.
- Responses were generated by prompting GPT-5 with the query, the retrieved context, and instructions to produce concise answers referencing the context.
TinyLlama was finetuned on this dataset, resulting in a dedicated TinyLlama model for Abalone RAG. This model is designed to provide concise, context-aware answers about abalone for use in the RAG application.
These are the hyperparamters that were used, and they were not optimized:
- Epochs: 3
- Batch Size: 2
- Gradient Accumulation Steps: 8
- Learning Rate: 2e-4
- Downloads last month
- 6