Instructions to use tekkonetes/fineneo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tekkonetes/fineneo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tekkonetes/fineneo")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tekkonetes/fineneo") model = AutoModelForCausalLM.from_pretrained("tekkonetes/fineneo") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tekkonetes/fineneo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tekkonetes/fineneo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tekkonetes/fineneo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tekkonetes/fineneo
- SGLang
How to use tekkonetes/fineneo 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 "tekkonetes/fineneo" \ --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": "tekkonetes/fineneo", "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 "tekkonetes/fineneo" \ --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": "tekkonetes/fineneo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tekkonetes/fineneo with Docker Model Runner:
docker model run hf.co/tekkonetes/fineneo
FineNeo: A simple way to finetune your very own GPT-Neo model.
Created by Tekkonetes with debugging help from ChatGPT. @Tekkonetes (HuggingFace) / @pxlmastrXD (Replit)
So, you want to fine-tune a GPT-Neo model? Well, here's the simplest script you will get. It uses a text dataset to fine-tune, and it also will tune the model fairly quickly. Normally, it takes about 5 seconds for an epoch to finish, so here are some estimated times:
| Epochs | Time (Seconds) | Adjusted time |
|---|---|---|
| 1 | 5 | |
| 10 | 50 | |
| 50 | 250 | 4m 10s |
| 100 | 500 | 8m 20s |
Yes, it's fairly fast. However, it depends on which GPT-Neo model you're fine-tuning. For example, the chart above is the EleutherAI/GPT-Neo-125M model. If you use the Gpt-Neo-1.3B model, it will probably take longer.
Using the script.
First, download the tune.py file to your computer. Then (optional) set up a virtual environment:
python -m venv venv
source venv/bin/activate
Now, install the needed packages:
pip install transformers torch
Finally, create your dataset, modify the file to use the dataset, and run the python script.
python tune.py
Your model and tokenizer will appear in the fine-tuned-gpt-neo directory. You can then use transformers to run the model, or upload the files to the HuggingFace hub.
Best of luck! - Tekkonetes - @pxlmastrXD (Replit)
- Downloads last month
- 6