Text Generation
Transformers
Safetensors
English
gemma2
Merge
mergekit
conversational
text-generation-inference
Instructions to use AELLM/gemma-2-lyco-infinity-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AELLM/gemma-2-lyco-infinity-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AELLM/gemma-2-lyco-infinity-9b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AELLM/gemma-2-lyco-infinity-9b") model = AutoModelForCausalLM.from_pretrained("AELLM/gemma-2-lyco-infinity-9b") 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 Settings
- vLLM
How to use AELLM/gemma-2-lyco-infinity-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AELLM/gemma-2-lyco-infinity-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AELLM/gemma-2-lyco-infinity-9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AELLM/gemma-2-lyco-infinity-9b
- SGLang
How to use AELLM/gemma-2-lyco-infinity-9b 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 "AELLM/gemma-2-lyco-infinity-9b" \ --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": "AELLM/gemma-2-lyco-infinity-9b", "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 "AELLM/gemma-2-lyco-infinity-9b" \ --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": "AELLM/gemma-2-lyco-infinity-9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AELLM/gemma-2-lyco-infinity-9b with Docker Model Runner:
docker model run hf.co/AELLM/gemma-2-lyco-infinity-9b
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,19 @@
|
|
| 1 |
---
|
| 2 |
base_model:
|
|
|
|
| 3 |
- BAAI/Gemma2-9B-IT-Simpo-Infinity-Preference
|
|
|
|
| 4 |
tags:
|
| 5 |
- merge
|
| 6 |
- mergekit
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
-
#
|
| 10 |
|
| 11 |
-
|
|
|
|
| 12 |
* [BAAI/Gemma2-9B-IT-Simpo-Infinity-Preference](https://huggingface.co/BAAI/Gemma2-9B-IT-Simpo-Infinity-Preference)
|
| 13 |
|
| 14 |
## 🧩 Configuration
|
|
@@ -37,7 +42,7 @@ import transformers
|
|
| 37 |
import torch
|
| 38 |
|
| 39 |
model = "AELLM/gemma-2-lyco-infinity-9b"
|
| 40 |
-
messages = [{"role": "user", "content": "
|
| 41 |
|
| 42 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
| 43 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
|
|
| 1 |
---
|
| 2 |
base_model:
|
| 3 |
+
- recoilme/recoilme-gemma-2-9B-v0.4
|
| 4 |
- BAAI/Gemma2-9B-IT-Simpo-Infinity-Preference
|
| 5 |
+
library_name: transformers
|
| 6 |
tags:
|
| 7 |
- merge
|
| 8 |
- mergekit
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Gemma 2 Lyco Infinity 9B
|
| 14 |
|
| 15 |
+
Gemma 2 Lyco Infinity 9B is a merge of the following models using [Mergekit](https://github.com/arcee-ai/mergekit):
|
| 16 |
+
* [recoilme/recoilme-gemma-2-9B-v0.4](https://huggingface.co/recoilme/recoilme-gemma-2-9B-v0.4)
|
| 17 |
* [BAAI/Gemma2-9B-IT-Simpo-Infinity-Preference](https://huggingface.co/BAAI/Gemma2-9B-IT-Simpo-Infinity-Preference)
|
| 18 |
|
| 19 |
## 🧩 Configuration
|
|
|
|
| 42 |
import torch
|
| 43 |
|
| 44 |
model = "AELLM/gemma-2-lyco-infinity-9b"
|
| 45 |
+
messages = [{"role": "user", "content": "You're an AI assistant for a time traveler. How do you help them blend into different historical eras without causing any time paradoxes?"}]
|
| 46 |
|
| 47 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
| 48 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|