Instructions to use lamini/lamini_docs_finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lamini/lamini_docs_finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lamini/lamini_docs_finetuned")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lamini/lamini_docs_finetuned") model = AutoModelForCausalLM.from_pretrained("lamini/lamini_docs_finetuned") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lamini/lamini_docs_finetuned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lamini/lamini_docs_finetuned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lamini/lamini_docs_finetuned", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lamini/lamini_docs_finetuned
- SGLang
How to use lamini/lamini_docs_finetuned 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 "lamini/lamini_docs_finetuned" \ --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": "lamini/lamini_docs_finetuned", "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 "lamini/lamini_docs_finetuned" \ --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": "lamini/lamini_docs_finetuned", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lamini/lamini_docs_finetuned with Docker Model Runner:
docker model run hf.co/lamini/lamini_docs_finetuned
Fine-tuning on Lamini
Hi @sudocoder and the Lamini team,
I'm trying to replicate fine-tuning of EleutherAI/pythia-70m to get something like this model lamini/lamini_docs_finetuned. I'm using the dataset from Sharon's DeepLearning.AI course (see lamini_docs.jsonl in the Jupyter notebook for https://learn.deeplearning.ai/finetuning-large-language-models/lesson/5/data-preparation) and the Lamini platform for this. However, I'm getting poor results, fine-tuning EleutherAI/pythia-410m doesn't seem to converge, while meta-llama/Llama-2-7b-hf is converging. Not sure if I'm missing something here.
I'd really appreciate it if you guys could help me understand the following:
- Was the same training dataset used here as in the DeepLearning.ai course?
- Is EleutherAI/pythia-70m the base model?
- How many epochs did it take to get the fine-tuned model?
Thank you!
P.S. Manual evaluation of the fine-tuned models using "What is Lamini value prop?":
- lamini/lamini_docs_finetuned:
"Lamini is a Python package that provides a base model for generating text in a specific format. It provides a method for generating text in a specific format, such as a word or a word of a specific kind, and can be used to generate text that is representative of the specific kind. Additionally, Lamini provides a method for generating text in a specific format, such as a word or a specific kind, and can be used to generate text that" - Fine-tuned EleutherAI/pythia-410m:
"Is it a library or a tool? Is it a tool for developers to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use? Is it a library for users to use" - Fine-tuned meta-llama/Llama-2-7b-hf:
"Lamini is a language model that can generate text based on a given prompt. Can you explain what the code does and how it works?Lamini is a language model that can generate text based on a given prompt. The code explains the setup of the program and how to use it. It includes importing necessary modules, defining variables, and creating a function that takes in a prompt and returns a generated story. The code also includes examples of prompts and generated stories to demonstrate the program's capabilities. Overall, the code provides a framework for generating stories using Lamini." - Fine-tuned gpt-3.5-turbo-1106:
"Lamini’s value proposition lies in its provision of a distinct engine that is optimized to process language-based algorithms. Efficiencies gained through this engine result in more time-effective development and deployment of language models."