Instructions to use rhysjones/gpt2-774M-fineweb-150B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rhysjones/gpt2-774M-fineweb-150B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rhysjones/gpt2-774M-fineweb-150B", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rhysjones/gpt2-774M-fineweb-150B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("rhysjones/gpt2-774M-fineweb-150B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rhysjones/gpt2-774M-fineweb-150B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rhysjones/gpt2-774M-fineweb-150B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rhysjones/gpt2-774M-fineweb-150B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rhysjones/gpt2-774M-fineweb-150B
- SGLang
How to use rhysjones/gpt2-774M-fineweb-150B 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 "rhysjones/gpt2-774M-fineweb-150B" \ --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": "rhysjones/gpt2-774M-fineweb-150B", "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 "rhysjones/gpt2-774M-fineweb-150B" \ --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": "rhysjones/gpt2-774M-fineweb-150B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rhysjones/gpt2-774M-fineweb-150B with Docker Model Runner:
docker model run hf.co/rhysjones/gpt2-774M-fineweb-150B
Is this a complete dataset?
#1
by ifmain - opened
Did you use the full set of fineweb 150b or what percentage?
Hey @ifmain .
This is karpathy's build from https://github.com/karpathy/llm.c/discussions/580 converted to HF format to investigate bfloat16 performance - see https://github.com/karpathy/llm.c/pull/571. The run was 150B tokens, 1.5 epochs over the 100B FineWeb sample dataset.
There's active work underway at https://github.com/karpathy/llm.c so I'd suggest following the developments there as well!
ifmain changed discussion status to closed