Text Generation
Transformers
Safetensors
gemma
cod
cpp
c
embedded c
conversational
text-generation-inference
Instructions to use gouthamsk/gemma_embedded_c_7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gouthamsk/gemma_embedded_c_7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gouthamsk/gemma_embedded_c_7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gouthamsk/gemma_embedded_c_7b") model = AutoModelForCausalLM.from_pretrained("gouthamsk/gemma_embedded_c_7b") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use gouthamsk/gemma_embedded_c_7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gouthamsk/gemma_embedded_c_7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gouthamsk/gemma_embedded_c_7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gouthamsk/gemma_embedded_c_7b
- SGLang
How to use gouthamsk/gemma_embedded_c_7b 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 "gouthamsk/gemma_embedded_c_7b" \ --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": "gouthamsk/gemma_embedded_c_7b", "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 "gouthamsk/gemma_embedded_c_7b" \ --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": "gouthamsk/gemma_embedded_c_7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gouthamsk/gemma_embedded_c_7b with Docker Model Runner:
docker model run hf.co/gouthamsk/gemma_embedded_c_7b
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
@@ -17,13 +22,12 @@ tags: []
|
|
| 17 |
|
| 18 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
|
| 20 |
-
- **Developed by:** [
|
| 21 |
-
- **Funded by [optional]:** [
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
- **Model type:** [More Information Needed]
|
| 24 |
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:**
|
| 26 |
-
- **Finetuned from model [optional]:** [
|
| 27 |
|
| 28 |
### Model Sources [optional]
|
| 29 |
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- cod
|
| 5 |
+
- cpp
|
| 6 |
+
- c
|
| 7 |
+
- embedded c
|
| 8 |
+
license: gpl-2.0
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for Model ID
|
|
|
|
| 22 |
|
| 23 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 24 |
|
| 25 |
+
- **Developed by:** [Goutham S Krishna](https://www.linkedin.com/in/goutham-s-krishna-21ab151a0/)
|
| 26 |
+
- **Funded by [optional]:** [BiboxLabs](https://biboxlabs.com/)
|
|
|
|
| 27 |
- **Model type:** [More Information Needed]
|
| 28 |
- **Language(s) (NLP):** [More Information Needed]
|
| 29 |
+
- **License:** GLPv2
|
| 30 |
+
- **Finetuned from model [optional]:** [google/gemma-7b-it](https://huggingface.co/google/gemma-7b-it)
|
| 31 |
|
| 32 |
### Model Sources [optional]
|
| 33 |
|