Instructions to use Gan1108/robertaForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gan1108/robertaForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gan1108/robertaForCausalLM")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Gan1108/robertaForCausalLM") model = AutoModelForCausalLM.from_pretrained("Gan1108/robertaForCausalLM") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gan1108/robertaForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gan1108/robertaForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gan1108/robertaForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Gan1108/robertaForCausalLM
- SGLang
How to use Gan1108/robertaForCausalLM 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/robertaForCausalLM" \ --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/robertaForCausalLM", "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/robertaForCausalLM" \ --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/robertaForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Gan1108/robertaForCausalLM with Docker Model Runner:
docker model run hf.co/Gan1108/robertaForCausalLM
Training in progress, step 500
Browse files- config.json +1 -1
- model.safetensors +1 -1
- training_args.bin +2 -2
config.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"pad_token_id": 1,
|
| 23 |
"position_embedding_type": "absolute",
|
| 24 |
"torch_dtype": "float32",
|
| 25 |
-
"transformers_version": "4.
|
| 26 |
"type_vocab_size": 1,
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 31274
|
|
|
|
| 22 |
"pad_token_id": 1,
|
| 23 |
"position_embedding_type": "absolute",
|
| 24 |
"torch_dtype": "float32",
|
| 25 |
+
"transformers_version": "4.37.2",
|
| 26 |
"type_vocab_size": 1,
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 31274
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 440397632
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:939f40898a060c716655ba7b9c12339bfe6e86ffcaa03865bb567d4446bb182d
|
| 3 |
size 440397632
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e79696e916eafca1fa6c84b4013990f0e65e6b65c72e2dcad90acf5da4f29984
|
| 3 |
+
size 4728
|