Text Generation
Transformers
Safetensors
PyTorch
English
llama
conversational
text-generation-inference
Instructions to use Abrar21/Eyellama_optc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Abrar21/Eyellama_optc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Abrar21/Eyellama_optc") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Abrar21/Eyellama_optc") model = AutoModelForCausalLM.from_pretrained("Abrar21/Eyellama_optc") 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 Abrar21/Eyellama_optc with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Abrar21/Eyellama_optc" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Abrar21/Eyellama_optc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Abrar21/Eyellama_optc
- SGLang
How to use Abrar21/Eyellama_optc 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 "Abrar21/Eyellama_optc" \ --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": "Abrar21/Eyellama_optc", "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 "Abrar21/Eyellama_optc" \ --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": "Abrar21/Eyellama_optc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Abrar21/Eyellama_optc with Docker Model Runner:
docker model run hf.co/Abrar21/Eyellama_optc
Update config.json
Browse files- config.json +4 -4
config.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "QIAIUNCC/EYE-Llama_gqa",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"LlamaForCausalLM"
|
| 5 |
-
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 1,
|
|
@@ -26,5 +24,7 @@
|
|
| 26 |
"torch_dtype": "float16",
|
| 27 |
"transformers_version": "4.48.3",
|
| 28 |
"use_cache": true,
|
| 29 |
-
"vocab_size": 32000
|
|
|
|
|
|
|
| 30 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "QIAIUNCC/EYE-Llama_gqa",
|
| 3 |
+
"architectures": ["LlamaForCausalLM"],
|
|
|
|
|
|
|
| 4 |
"attention_bias": false,
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"bos_token_id": 1,
|
|
|
|
| 24 |
"torch_dtype": "float16",
|
| 25 |
"transformers_version": "4.48.3",
|
| 26 |
"use_cache": true,
|
| 27 |
+
"vocab_size": 32000,
|
| 28 |
+
"tags": ["text-generation", "conversational"],
|
| 29 |
+
"library": "transformers"
|
| 30 |
}
|