Instructions to use fierysurf/Ambari-7B-base-v0.1-sharded with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fierysurf/Ambari-7B-base-v0.1-sharded with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fierysurf/Ambari-7B-base-v0.1-sharded")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fierysurf/Ambari-7B-base-v0.1-sharded") model = AutoModelForCausalLM.from_pretrained("fierysurf/Ambari-7B-base-v0.1-sharded") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use fierysurf/Ambari-7B-base-v0.1-sharded with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fierysurf/Ambari-7B-base-v0.1-sharded" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fierysurf/Ambari-7B-base-v0.1-sharded", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fierysurf/Ambari-7B-base-v0.1-sharded
- SGLang
How to use fierysurf/Ambari-7B-base-v0.1-sharded 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 "fierysurf/Ambari-7B-base-v0.1-sharded" \ --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": "fierysurf/Ambari-7B-base-v0.1-sharded", "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 "fierysurf/Ambari-7B-base-v0.1-sharded" \ --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": "fierysurf/Ambari-7B-base-v0.1-sharded", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fierysurf/Ambari-7B-base-v0.1-sharded with Docker Model Runner:
docker model run hf.co/fierysurf/Ambari-7B-base-v0.1-sharded
(This repo contains the sharded version of the original Ambari-7B model)
Ambari-7B-Base-v0.1 (sharded)
Overview
Ambari-7B-Base-v0.1 is the first bilingual English/Kannada model in the Ambari series, developed and released by Cognitivelab.in. Based on the Llama2 model by Meta, this 7B parameter model is the outcome of the pretraining stage, involving training on approximately 500 million new Kannada tokens.
Usage
To use the Ambari-7B-Base-v0.1 model, you can follow the example code below:
# Usage
import torch
from transformers import LlamaTokenizer, LlamaForCausalLM
model = LlamaForCausalLM.from_pretrained('Cognitive-Lab/Ambari-7B-Base-v0.1')
tokenizer = LlamaTokenizer.from_pretrained('Cognitive-Lab/Ambari-7B-Base-v0.1')
prompt = "ಕನ್ನಡದ ಇತಿಹಾಸವನ್ನು ವಿವರವಾಗಿ ತಿಳಿಸಿ"
inputs = tokenizer(prompt, return_tensors="pt")
# Generate
generate_ids = model.generate(inputs.input_ids, max_length=30)
decoded_output = tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
print(decoded_output)
Important: The provided model serves as a foundation and is not designed for independent use. We strongly advise conducting finetuning tailored to your particular task(s) of interest before deploying it in a production environment. Feel free to customize the code according to your specific use case, ensuring that the model undergoes finetuning for optimal performance in your desired application.
- Downloads last month
- 204