Text Generation
Transformers
PyTorch
JAX
Romanian
gpt_neo
romanian
text generation
causal lm
gpt-neo
Instructions to use iliemihai/gpt-neo-romanian-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iliemihai/gpt-neo-romanian-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iliemihai/gpt-neo-romanian-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iliemihai/gpt-neo-romanian-125m") model = AutoModelForCausalLM.from_pretrained("iliemihai/gpt-neo-romanian-125m") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use iliemihai/gpt-neo-romanian-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iliemihai/gpt-neo-romanian-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iliemihai/gpt-neo-romanian-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/iliemihai/gpt-neo-romanian-125m
- SGLang
How to use iliemihai/gpt-neo-romanian-125m 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 "iliemihai/gpt-neo-romanian-125m" \ --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": "iliemihai/gpt-neo-romanian-125m", "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 "iliemihai/gpt-neo-romanian-125m" \ --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": "iliemihai/gpt-neo-romanian-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use iliemihai/gpt-neo-romanian-125m with Docker Model Runner:
docker model run hf.co/iliemihai/gpt-neo-romanian-125m
Upload 11 files
Browse files- config.json +54 -0
- flax_model.msgpack +3 -0
- generation_config.json +6 -0
- merges.txt +0 -0
- opt_state.msgpack +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- training_state.json +1 -0
- vocab.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "ckpt-5800000",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPTNeoForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0,
|
| 8 |
+
"attention_layers": [
|
| 9 |
+
"global",
|
| 10 |
+
"local",
|
| 11 |
+
"global",
|
| 12 |
+
"local",
|
| 13 |
+
"global",
|
| 14 |
+
"local",
|
| 15 |
+
"global",
|
| 16 |
+
"local",
|
| 17 |
+
"global",
|
| 18 |
+
"local",
|
| 19 |
+
"global",
|
| 20 |
+
"local"
|
| 21 |
+
],
|
| 22 |
+
"attention_types": [
|
| 23 |
+
[
|
| 24 |
+
[
|
| 25 |
+
"global",
|
| 26 |
+
"local"
|
| 27 |
+
],
|
| 28 |
+
6
|
| 29 |
+
]
|
| 30 |
+
],
|
| 31 |
+
"bos_token_id": 0,
|
| 32 |
+
"embed_dropout": 0,
|
| 33 |
+
"eos_token_id": 0,
|
| 34 |
+
"gradient_checkpointing": false,
|
| 35 |
+
"hidden_size": 768,
|
| 36 |
+
"initializer_range": 0.02,
|
| 37 |
+
"intermediate_size": null,
|
| 38 |
+
"layer_norm_epsilon": 1e-05,
|
| 39 |
+
"max_position_embeddings": 2048,
|
| 40 |
+
"model_type": "gpt_neo",
|
| 41 |
+
"num_heads": 12,
|
| 42 |
+
"num_layers": 12,
|
| 43 |
+
"resid_dropout": 0,
|
| 44 |
+
"summary_activation": null,
|
| 45 |
+
"summary_first_dropout": 0.1,
|
| 46 |
+
"summary_proj_to_labels": true,
|
| 47 |
+
"summary_type": "cls_index",
|
| 48 |
+
"summary_use_proj": true,
|
| 49 |
+
"torch_dtype": "float32",
|
| 50 |
+
"transformers_version": "4.27.4",
|
| 51 |
+
"use_cache": true,
|
| 52 |
+
"vocab_size": 64000,
|
| 53 |
+
"window_size": 256
|
| 54 |
+
}
|
flax_model.msgpack
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4695a51a9491ec60f61afa582421fd392e178c0d3af097fe319e339c1ca21b9b
|
| 3 |
+
size 543018616
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 0,
|
| 5 |
+
"transformers_version": "4.27.4"
|
| 6 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
opt_state.msgpack
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94772b775ed9f2e35eaa07f45dcf6d5f338692b519342d59207b7efd838c4712
|
| 3 |
+
size 1629056014
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a85369432ef20de6531cdad2cc8e98f3002cd233ffc4fd383c65ed7aa0d6734e
|
| 3 |
+
size 593402733
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"errors": "replace", "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "model_max_length": 2048, "special_tokens_map_file": null, "tokenizer_class": "GPT2Tokenizer", "name_or_path": "gpt2"}
|
training_state.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"step": 5800001}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|