Instructions to use smjain/abap-nous-hermes with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smjain/abap-nous-hermes with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="smjain/abap-nous-hermes")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("smjain/abap-nous-hermes") model = AutoModelForCausalLM.from_pretrained("smjain/abap-nous-hermes") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use smjain/abap-nous-hermes with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "smjain/abap-nous-hermes" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "smjain/abap-nous-hermes", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/smjain/abap-nous-hermes
- SGLang
How to use smjain/abap-nous-hermes 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 "smjain/abap-nous-hermes" \ --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": "smjain/abap-nous-hermes", "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 "smjain/abap-nous-hermes" \ --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": "smjain/abap-nous-hermes", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use smjain/abap-nous-hermes with Docker Model Runner:
docker model run hf.co/smjain/abap-nous-hermes
This model is fine tuned on a very small ABAP dataset . Have used NousResearch/Llama-2-7b-chat-hf as the base model.
Sample code
from transformers import pipeline from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "smjain/abap-nous-hermes"
model = AutoModelForCausalLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained('NousResearch/llama-2-7b-chat-hf')
prompt = "Write a sample ABAP report" # change to your desired prompt
gen = pipeline('text-generation', model=model, tokenizer=tokenizer,max_new_tokens=256)
result = gen(prompt)
print(result[0]['generated_text'])
- Downloads last month
- 4