Instructions to use Gan1108/electraForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gan1108/electraForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gan1108/electraForCausalLM")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Gan1108/electraForCausalLM") model = AutoModelForCausalLM.from_pretrained("Gan1108/electraForCausalLM", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gan1108/electraForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gan1108/electraForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gan1108/electraForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Gan1108/electraForCausalLM
- SGLang
How to use Gan1108/electraForCausalLM 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 "Gan1108/electraForCausalLM" \ --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": "Gan1108/electraForCausalLM", "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 "Gan1108/electraForCausalLM" \ --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": "Gan1108/electraForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Gan1108/electraForCausalLM with Docker Model Runner:
docker model run hf.co/Gan1108/electraForCausalLM
Commit History
-
Update README.md
Verified signaturead1eae2 -
Update README.md
Verified signature22df713
-
End of training
Verified signature763e818 -
Training in progress, step 7000
Verified signature884d705 -
Training in progress, step 6500
Verified signatureb53b4f7 -
Training in progress, step 6000
Verified signature3f2376e -
Training in progress, step 5500
Verified signature036ead4 -
Training in progress, step 5000
Verified signaturebe5c27e -
Training in progress, step 4500
Verified signature086781b -
Training in progress, step 4000
Verified signaturec79a346 -
Training in progress, step 3500
Verified signature30b5951 -
Training in progress, step 3000
Verified signatured8a9f83 -
Training in progress, step 2500
Verified signature9bd0453 -
Training in progress, step 2000
Verified signature2b74c5e -
Training in progress, step 1500
Verified signature0dfe5ba -
Training in progress, step 1000
Verified signature918decc -
Training in progress, step 500
Verified signature125c274 -
initial commit
Verified signature2816d59