Text Generation
Transformers
PyTorch
Safetensors
gpt2
multilingual
PyTorch
Transformers
gpt3
Deepspeed
Megatron
text-generation-inference
Instructions to use pszemraj/mGPT-Peter-mwe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pszemraj/mGPT-Peter-mwe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pszemraj/mGPT-Peter-mwe")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pszemraj/mGPT-Peter-mwe") model = AutoModelForCausalLM.from_pretrained("pszemraj/mGPT-Peter-mwe", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pszemraj/mGPT-Peter-mwe with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pszemraj/mGPT-Peter-mwe" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pszemraj/mGPT-Peter-mwe", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pszemraj/mGPT-Peter-mwe
- SGLang
How to use pszemraj/mGPT-Peter-mwe 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 "pszemraj/mGPT-Peter-mwe" \ --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": "pszemraj/mGPT-Peter-mwe", "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 "pszemraj/mGPT-Peter-mwe" \ --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": "pszemraj/mGPT-Peter-mwe", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pszemraj/mGPT-Peter-mwe with Docker Model Runner:
docker model run hf.co/pszemraj/mGPT-Peter-mwe
Adding `safetensors` variant of this model
#1
by SFconvertbot - opened
- README.md +24 -75
- model.safetensors +2 -2
README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
| 3 |
tags:
|
| 4 |
- multilingual
|
| 5 |
- PyTorch
|
|
@@ -11,93 +12,41 @@ tags:
|
|
| 11 |
datasets:
|
| 12 |
- mc4
|
| 13 |
- Wikipedia
|
| 14 |
-
pipeline_tag: text-generation
|
| 15 |
-
widget:
|
| 16 |
-
- text: 'I know you''re tired, but can we go for another walk this evening?
|
| 17 |
-
|
| 18 |
-
peter szemraj:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
'
|
| 22 |
-
example_title: walk
|
| 23 |
-
- text: 'What do you call an alligator who''s just had surgery to remove his left
|
| 24 |
-
arm?
|
| 25 |
-
|
| 26 |
-
peter szemraj:
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
'
|
| 30 |
-
example_title: alligator
|
| 31 |
-
- text: 'If you could live anywhere, where would it be?
|
| 32 |
-
|
| 33 |
-
peter szemraj:
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
'
|
| 37 |
-
example_title: dream living place
|
| 38 |
-
- text: 'What really makes you angry?
|
| 39 |
-
|
| 40 |
-
peter szemraj:
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
'
|
| 44 |
-
example_title: pet peeve
|
| 45 |
-
- text: 'My friend says that she knows every language, but she doesn''t speak any
|
| 46 |
-
of them.. what''s wrong with her?
|
| 47 |
-
|
| 48 |
-
peter szemraj:
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
'
|
| 52 |
-
example_title: language
|
| 53 |
-
- text: 'What would you change about yourself if you could?
|
| 54 |
-
|
| 55 |
-
peter szemraj:
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
'
|
| 59 |
-
example_title: change
|
| 60 |
-
- text: 'My first is in Asia, my second is in Europe, my third is in North America,
|
| 61 |
-
and my fourth is in South America. What am I?
|
| 62 |
-
|
| 63 |
-
peter szemraj:
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
'
|
| 67 |
-
example_title: continent
|
| 68 |
-
- text: 'Can you take me for dinner somewhere nice this time?
|
| 69 |
-
|
| 70 |
-
peter szemraj:
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
'
|
| 74 |
-
example_title: dinner
|
| 75 |
-
- text: 'Honey, I have clogged the toilet for the third time this month.. sorry..
|
| 76 |
-
|
| 77 |
-
peter szemraj:
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
'
|
| 81 |
-
example_title: overflow
|
| 82 |
-
- text: 'A man pushes his car to a hotel and tells the owner he''s bankrupt. Why?
|
| 83 |
-
|
| 84 |
-
peter szemraj:
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
-
'
|
| 88 |
-
example_title: brain teaser
|
| 89 |
inference:
|
| 90 |
parameters:
|
| 91 |
min_length: 2
|
| 92 |
max_length: 64
|
| 93 |
length_penalty: 0.4
|
| 94 |
no_repeat_ngram_size: 3
|
| 95 |
-
do_sample:
|
| 96 |
top_p: 0.95
|
| 97 |
top_k: 30
|
| 98 |
temperature: 0.65
|
| 99 |
repetition_penalty: 3.5
|
| 100 |
-
|
| 101 |
---
|
| 102 |
|
| 103 |
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
tags:
|
| 5 |
- multilingual
|
| 6 |
- PyTorch
|
|
|
|
| 12 |
datasets:
|
| 13 |
- mc4
|
| 14 |
- Wikipedia
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
widget:
|
| 17 |
+
- text: "I know you're tired, but can we go for another walk this evening?\npeter szemraj:\n\n"
|
| 18 |
+
example_title: "walk"
|
| 19 |
+
- text: "What do you call an alligator who's just had surgery to remove his left arm?\npeter szemraj:\n\n"
|
| 20 |
+
example_title: "alligator"
|
| 21 |
+
- text: "If you could live anywhere, where would it be?\npeter szemraj:\n\n"
|
| 22 |
+
example_title: "dream living place"
|
| 23 |
+
- text: "What really makes you angry?\npeter szemraj:\n\n"
|
| 24 |
+
example_title: "pet peeve"
|
| 25 |
+
- text: "My friend says that she knows every language, but she doesn't speak any of them.. what's wrong with her?\npeter szemraj:\n\n"
|
| 26 |
+
example_title: "language"
|
| 27 |
+
- text: "What would you change about yourself if you could?\npeter szemraj:\n\n"
|
| 28 |
+
example_title: "change"
|
| 29 |
+
- text: "My first is in Asia, my second is in Europe, my third is in North America, and my fourth is in South America. What am I?\npeter szemraj:\n\n"
|
| 30 |
+
example_title: "continent"
|
| 31 |
+
- text: "Can you take me for dinner somewhere nice this time?\npeter szemraj:\n\n"
|
| 32 |
+
example_title: "dinner"
|
| 33 |
+
- text: "Honey, I have clogged the toilet for the third time this month.. sorry..\npeter szemraj:\n\n"
|
| 34 |
+
example_title: "overflow"
|
| 35 |
+
- text: "A man pushes his car to a hotel and tells the owner he's bankrupt. Why?\npeter szemraj:\n\n"
|
| 36 |
+
example_title: "brain teaser"
|
| 37 |
|
|
|
|
|
|
|
| 38 |
inference:
|
| 39 |
parameters:
|
| 40 |
min_length: 2
|
| 41 |
max_length: 64
|
| 42 |
length_penalty: 0.4
|
| 43 |
no_repeat_ngram_size: 3
|
| 44 |
+
do_sample: True
|
| 45 |
top_p: 0.95
|
| 46 |
top_k: 30
|
| 47 |
temperature: 0.65
|
| 48 |
repetition_penalty: 3.5
|
| 49 |
+
|
| 50 |
---
|
| 51 |
|
| 52 |
|
model.safetensors
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:65daafaa1e0da7afc7895e00655e036fca59ab377be13b35951e4afbcbee4e94
|
| 3 |
+
size 6073076598
|