Instructions to use DarwinAnim8or/GPT-Grug-355m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DarwinAnim8or/GPT-Grug-355m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DarwinAnim8or/GPT-Grug-355m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DarwinAnim8or/GPT-Grug-355m") model = AutoModelForCausalLM.from_pretrained("DarwinAnim8or/GPT-Grug-355m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DarwinAnim8or/GPT-Grug-355m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DarwinAnim8or/GPT-Grug-355m" # 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-Grug-355m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DarwinAnim8or/GPT-Grug-355m
- SGLang
How to use DarwinAnim8or/GPT-Grug-355m 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-Grug-355m" \ --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-Grug-355m", "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-Grug-355m" \ --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-Grug-355m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DarwinAnim8or/GPT-Grug-355m with Docker Model Runner:
docker model run hf.co/DarwinAnim8or/GPT-Grug-355m
GPT-Grug-355m
A finetuned version of GPT2-Medium on the 'grug' dataset. A demo is available here
If you're interested, there's a smaller model available here: GPT-Grug-125m Do note however that it is very limited by comparison.
Training Procedure
This was trained on the 'grug' dataset, using the "HappyTransformers" library on Google Colab. This model was trained for 4 epochs with learning rate 1e-2. The notebook used to train has been included in this repo.
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 grug datasets.
Intended Use
This model is meant for fun, please do not take anything this caveman says seriously.
Sample Use
#Import model:
from happytransformer import HappyGeneration
happy_gen = HappyGeneration("GPT2", "DarwinAnim8or/gpt-grug-355m")
#Set generation settings:
from happytransformer import GENSettings
args_top_k = GENSettings(no_repeat_ngram_size=2, do_sample=True,top_k=50, temperature=0.7, max_length=50, early_stopping=False)
#Generate a response:
result = happy_gen.generate_text("""Person: "Hello grug"
Grug: "hello person"
###
Person: "how are you grug"
Grug: "grug doing ok. grug find many berry. good for tribe."
###
Person: "what does grug think of new spear weapon?"
Grug: "grug no like new spear weapon. grug stick bigger. spear too small, break easy"
###
Person: "what does grug think of football?"
Grug: \"""", args=args_top_k)
print(result)
print(result.text)
- Downloads last month
- 12