Text Generation
Transformers
PyTorch
English
llama
Yi-34B
instruct
finetune
agriculture
conversational
text-generation-inference
Instructions to use gbstox/agronomYi-hermes-34B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gbstox/agronomYi-hermes-34B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gbstox/agronomYi-hermes-34B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gbstox/agronomYi-hermes-34B") model = AutoModelForCausalLM.from_pretrained("gbstox/agronomYi-hermes-34B", device_map="auto") 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 gbstox/agronomYi-hermes-34B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gbstox/agronomYi-hermes-34B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gbstox/agronomYi-hermes-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gbstox/agronomYi-hermes-34B
- SGLang
How to use gbstox/agronomYi-hermes-34B 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 "gbstox/agronomYi-hermes-34B" \ --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": "gbstox/agronomYi-hermes-34B", "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 "gbstox/agronomYi-hermes-34B" \ --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": "gbstox/agronomYi-hermes-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gbstox/agronomYi-hermes-34B with Docker Model Runner:
docker model run hf.co/gbstox/agronomYi-hermes-34B
AgronomYi-hermes-34B
About
AgronomYi is a fine tune of Nous-Hermes-2-Yi-34B, which uses Yi-34B as the base model. I fine tuned this with agronomy data (exclusively textbooks & university extension guides), full training data set here). AgronomYi outperforms all models on the benchmark except for gpt-4, and consistently beats the base model by 7-9% and the hermes fine tune by 3-5%. I take this to mean that even better results can be acheived with additional fine tuning, and larger models tend to perform better in general.
Benchmark comparison
| Model Name | Score | Date Tested |
|---|---|---|
| gpt-4 | 85.71% | 2024-01-15 |
| agronomYi-hermes-34b | 79.05% | 2024-01-15 |
| mistral-medium | 77.14% | 2024-01-15 |
| nous-hermes-yi-34b | 76.19% | 2024-01-15 |
| mixtral-8x7b-instruct | 72.38% | 2024-01-15 |
| claude-2 | 72.38% | 2024-01-15 |
| yi-34b-chat | 71.43% | 2024-01-15 |
| norm | 69.52% | 2024-01-17 |
| openhermes-2.5-mistral-7b | 69.52% | 2024-01-15 |
| gpt-3.5-turbo | 67.62% | 2024-01-15 |
| mistral-7b-instruct | 61.9% | 2024-01-15 |
- Downloads last month
- 5
Model tree for gbstox/agronomYi-hermes-34B
Dataset used to train gbstox/agronomYi-hermes-34B
Preview • Updated • 452 • 6