Text Generation
Transformers
Safetensors
English
Hebrew
gemma
conversational
text-generation-inference
Instructions to use yam-peleg/Hebrew-Gemma-11B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yam-peleg/Hebrew-Gemma-11B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yam-peleg/Hebrew-Gemma-11B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yam-peleg/Hebrew-Gemma-11B-Instruct") model = AutoModelForCausalLM.from_pretrained("yam-peleg/Hebrew-Gemma-11B-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yam-peleg/Hebrew-Gemma-11B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yam-peleg/Hebrew-Gemma-11B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yam-peleg/Hebrew-Gemma-11B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yam-peleg/Hebrew-Gemma-11B-Instruct
- SGLang
How to use yam-peleg/Hebrew-Gemma-11B-Instruct 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 "yam-peleg/Hebrew-Gemma-11B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yam-peleg/Hebrew-Gemma-11B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "yam-peleg/Hebrew-Gemma-11B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yam-peleg/Hebrew-Gemma-11B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yam-peleg/Hebrew-Gemma-11B-Instruct with Docker Model Runner:
docker model run hf.co/yam-peleg/Hebrew-Gemma-11B-Instruct
Upload 8 files
Browse files
config.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/home/yam/gemma_hebrew_session_9_instruct_session_4/checkpoint-3150",
|
| 3 |
"architectures": [
|
| 4 |
"GemmaForCausalLM"
|
| 5 |
],
|
|
@@ -21,7 +20,7 @@
|
|
| 21 |
"rms_norm_eps": 1e-06,
|
| 22 |
"rope_scaling": null,
|
| 23 |
"rope_theta": 10000.0,
|
| 24 |
-
"torch_dtype": "
|
| 25 |
"transformers_version": "4.38.1",
|
| 26 |
"use_cache": false,
|
| 27 |
"vocab_size": 256000
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"GemmaForCausalLM"
|
| 4 |
],
|
|
|
|
| 20 |
"rms_norm_eps": 1e-06,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
+
"torch_dtype": "float16",
|
| 24 |
"transformers_version": "4.38.1",
|
| 25 |
"use_cache": false,
|
| 26 |
"vocab_size": 256000
|
model-00001-of-00005.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:7d7e3cd8fcdd6a305cd729f5b22c3ad8841e6d0bae7a3bf5d8a7254a43022cbe
|
| 3 |
+
size 4995496592
|
model-00002-of-00005.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:aff361a3fabceddf4fa32736139d436d3a237034219e1be6f6bf1d12aa194275
|
| 3 |
+
size 4982953088
|
model-00003-of-00005.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:fe5c7081f8a6266b1dae56f27af644831b6ef344b72be0f099deb52c3cc9f84d
|
| 3 |
+
size 4982953120
|
model-00004-of-00005.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:b10bc2c1fc776cb2b9240247d93a779143f32c3e84d49c6e724f37c6ee2066a7
|
| 3 |
+
size 4982953120
|
model-00005-of-00005.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:d867f769eeaece79438ad1deaa281c7e27e1e0ed100e08186c9f343b6b26869e
|
| 3 |
+
size 1006665384
|