Instructions to use crumb/fake-gpt-j-17m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use crumb/fake-gpt-j-17m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="crumb/fake-gpt-j-17m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("crumb/fake-gpt-j-17m") model = AutoModelForCausalLM.from_pretrained("crumb/fake-gpt-j-17m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use crumb/fake-gpt-j-17m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "crumb/fake-gpt-j-17m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "crumb/fake-gpt-j-17m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/crumb/fake-gpt-j-17m
- SGLang
How to use crumb/fake-gpt-j-17m 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 "crumb/fake-gpt-j-17m" \ --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": "crumb/fake-gpt-j-17m", "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 "crumb/fake-gpt-j-17m" \ --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": "crumb/fake-gpt-j-17m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use crumb/fake-gpt-j-17m with Docker Model Runner:
docker model run hf.co/crumb/fake-gpt-j-17m
fake-gpt-2-17m
This model is a GPTJ (with 17,637,632 parameters) trained from scratch on a synthetic dataset (1gb of documents created in 4 fake languages, each with a formal and informal writing style) for 1 epoch.
It achieves the following results on the evaluation set:
- Loss: 3.5592
Intended uses & limitations
This model is to be used as a base model for fine-tuning any language/task to probe the effectiveness of both pre-training on an algorithmically generated corpus and effectiveness of extremely small language models (SLMs?). It can only generate text based on its training data (which will be uploaded as a huggingface dataset soon).
Training and evaluation data
More information needed
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.001
- batch_size 64
- seed: 42
- optimizer: Adam
- lr_scheduler_type: linear
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.5175 | 1.0 | 46857 | 3.5592 |
Framework versions
- Transformers 4.22.1
- Pytorch 1.12.0
- Datasets 2.3.2
- Tokenizers 0.12.1
- Downloads last month
- 6