Instructions to use DarwinAnim8or/GPT-Greentext-1.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DarwinAnim8or/GPT-Greentext-1.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DarwinAnim8or/GPT-Greentext-1.5b")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("DarwinAnim8or/GPT-Greentext-1.5b") model = AutoModelForMultimodalLM.from_pretrained("DarwinAnim8or/GPT-Greentext-1.5b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DarwinAnim8or/GPT-Greentext-1.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DarwinAnim8or/GPT-Greentext-1.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DarwinAnim8or/GPT-Greentext-1.5b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DarwinAnim8or/GPT-Greentext-1.5b
- SGLang
How to use DarwinAnim8or/GPT-Greentext-1.5b 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 "DarwinAnim8or/GPT-Greentext-1.5b" \ --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": "DarwinAnim8or/GPT-Greentext-1.5b", "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 "DarwinAnim8or/GPT-Greentext-1.5b" \ --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": "DarwinAnim8or/GPT-Greentext-1.5b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DarwinAnim8or/GPT-Greentext-1.5b with Docker Model Runner:
docker model run hf.co/DarwinAnim8or/GPT-Greentext-1.5b
GPT-Greentext-1.5b
A finetuned version of GPT2-XL on the 'greentext' dataset. A demo is available here The demo playground is recommended over the inference box on the right.
This is the largest release of the "GPT-Greentext" model series. The other models can be found here:
Training Procedure
This was trained on the 'greentext' dataset, on Google Colab. This model was trained for 1 epoch with learning rate 1e-2. Notably this uses the "prompt" and "completion" style jsonl file, rather than the plain text file found in the greentext dataset. This nets somewhat better, mostly more consistent results.
Biases & Limitations
This likely contains the same biases and limitations as the original GPT2 that it is based on, and additionally heavy biases from the greentext dataset. It should be noted that offensive or not PG-output is definitely possible and likely will happen.
Intended Use
This model is meant for fun, nothing else.
Noteworthy differences between this model and the others
This model tends to like no_repeat_ngram_size values of 1 or 2; whereas the other models in this series tend to prefer 3.
Sample Use
#Import model:
from happytransformer import HappyGeneration
happy_gen = HappyGeneration("GPT2", "DarwinAnim8or/GPT-Greentext-1.5b")
#Set generation settings:
from happytransformer import GENSettings
args_top_k = GENSettingsGENSettings(no_repeat_ngram_size=1, do_sample=True, top_k=80, temperature=0.8, max_length=150, early_stopping=False)
#Generate a response:
result = happy_gen.generate_text(""">be me
>""", args=args_top_k)
print(result)
print(result.text)
- Downloads last month
- 1