Instructions to use mohammadmostafameb/Letter_e1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mohammadmostafameb/Letter_e1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mohammadmostafameb/Letter_e1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mohammadmostafameb/Letter_e1") model = AutoModelForCausalLM.from_pretrained("mohammadmostafameb/Letter_e1") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mohammadmostafameb/Letter_e1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mohammadmostafameb/Letter_e1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mohammadmostafameb/Letter_e1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mohammadmostafameb/Letter_e1
- SGLang
How to use mohammadmostafameb/Letter_e1 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 "mohammadmostafameb/Letter_e1" \ --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": "mohammadmostafameb/Letter_e1", "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 "mohammadmostafameb/Letter_e1" \ --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": "mohammadmostafameb/Letter_e1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mohammadmostafameb/Letter_e1 with Docker Model Runner:
docker model run hf.co/mohammadmostafameb/Letter_e1
Upload model
Browse files- config.json +3 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "gelu_new",
|
| 3 |
"architectures": [
|
| 4 |
"GPT2LMHeadModel"
|
|
@@ -35,7 +36,8 @@
|
|
| 35 |
"top_p": 0.95
|
| 36 |
}
|
| 37 |
},
|
| 38 |
-
"
|
|
|
|
| 39 |
"use_cache": true,
|
| 40 |
"vocab_size": 42001
|
| 41 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "HooshvareLab/gpt2-fa",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
|
|
| 36 |
"top_p": 0.95
|
| 37 |
}
|
| 38 |
},
|
| 39 |
+
"torch_dtype": "float32",
|
| 40 |
+
"transformers_version": "4.48.2",
|
| 41 |
"use_cache": true,
|
| 42 |
"vocab_size": 42001
|
| 43 |
}
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
"pad_token_id": 1,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
}
|
|
|
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
"pad_token_id": 1,
|
| 6 |
+
"transformers_version": "4.48.2"
|
| 7 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 472411776
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb56db6dc8be3297d27d3aa9a0e9f25fa10d971ab9c625e297abd900653c4046
|
| 3 |
size 472411776
|