Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
trl
conversational
Instructions to use davzoku/trained_expert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davzoku/trained_expert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="davzoku/trained_expert") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("davzoku/trained_expert") model = AutoModelForCausalLM.from_pretrained("davzoku/trained_expert") 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 davzoku/trained_expert with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "davzoku/trained_expert" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davzoku/trained_expert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/davzoku/trained_expert
- SGLang
How to use davzoku/trained_expert 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 "davzoku/trained_expert" \ --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": "davzoku/trained_expert", "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 "davzoku/trained_expert" \ --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": "davzoku/trained_expert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use davzoku/trained_expert with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for davzoku/trained_expert to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for davzoku/trained_expert to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for davzoku/trained_expert to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="davzoku/trained_expert", max_seq_length=2048, ) - Docker Model Runner
How to use davzoku/trained_expert with Docker Model Runner:
docker model run hf.co/davzoku/trained_expert
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,14 +9,40 @@ tags:
|
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
- en
|
| 12 |
+
datasets:
|
| 13 |
+
- davzoku/moecule-finqa
|
| 14 |
+
- davzoku/moecule-kyc
|
| 15 |
+
- davzoku/moecule-stock-market-outlook
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# 🫐🥫 trained_expert
|
| 19 |
|
| 20 |
+
<p align="center">
|
| 21 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/63c51d0e72db0f638ff1eb82/yLsrUZma5WnLzJrhI6ldZ.png" width="150" height="150" alt="logo">
|
| 22 |
+
</p>
|
| 23 |
|
| 24 |
+
## Model Details
|
| 25 |
|
| 26 |
+
This model is a domain-specific expert model for [Moecule](https://huggingface.co/collections/davzoku/moecule-67dabc6bb469dcd00ad2a7c5) family of MoE models.
|
| 27 |
+
|
| 28 |
+
It is part of [Moecule Ingredients](https://huggingface.co/collections/davzoku/moecule-ingredients-67dac0e6210eb1d95abc6411) and all relevant expert models, LoRA adapters, and datasets can be found there.
|
| 29 |
+
|
| 30 |
+
### Additional Information
|
| 31 |
+
|
| 32 |
+
- QLoRA 4-bit fine-tuning with Unsloth
|
| 33 |
+
- Base Model: `unsloth/llama-3-8b-Instruct`
|
| 34 |
+
|
| 35 |
+
## The Team
|
| 36 |
+
|
| 37 |
+
- CHOCK Wan Kee
|
| 38 |
+
- Farlin Deva Binusha DEVASUGIN MERLISUGITHA
|
| 39 |
+
- GOH Bao Sheng
|
| 40 |
+
- Jessica LEK Si Jia
|
| 41 |
+
- Sinha KHUSHI
|
| 42 |
+
- TENG Kok Wai (Walter)
|
| 43 |
+
|
| 44 |
+
## References
|
| 45 |
+
|
| 46 |
+
- [Unsloth Tutorial](https://docs.unsloth.ai/basics/tutorial-how-to-finetune-llama-3-and-use-in-ollama)
|
| 47 |
+
|
| 48 |
+
- [Unsloth Finetuning Colab Notebook](<https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3_(8B)-Ollama.ipynb#scrollTo=uMuVrWbjAzhc>)
|