Instructions to use kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor") model = AutoModelForMultimodalLM.from_pretrained("kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor") 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 kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor
- SGLang
How to use kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor 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 "kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor" \ --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": "kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor", "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 "kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor" \ --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": "kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor 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 kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor 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 kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor", max_seq_length=2048, ) - Docker Model Runner
How to use kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor with Docker Model Runner:
docker model run hf.co/kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor
kimhyeongjun/Hermes-3-Llama-3.1-8B-Korean-Finance-Advisor
This is my personal toy project for Chuseok(Korean Thanksgiving Day).
This model is a fine-tuned version of NousResearch/Hermes-3-Llama-3.1-8B on the Korean_synthetic_financial_dataset_21K.
Model description
Everything happened automatically without any user intervention.
Based on finance PDF data collected directly from the web, we refined the raw data using the 'neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8' model. After generating synthetic data based on the cleaned data, we further evaluated the quality of the generated data using the 'meta-llama/Llama-Guard-3-8B' and 'RLHFlow/ArmoRM-Llama3-8B-v0.1' models. We then used 'Alibaba-NLP/gte-large-en-v1.5' to extract embeddings and applied Faiss to perform Jaccard distance-based nearest neighbor analysis to construct the final dataset of 21k, which is diverse and sophisticated.
모든 과정은 사용자의 개입 없이 자동으로 진행되었습니다.
웹에서 직접 수집한 금융 관련 PDF 데이터를 기반으로, 돈이 없어서 'neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8' 모델을 활용하여 Raw 데이터를 정제하였습니다. 정제된 데이터를 바탕으로 합성 데이터를 생성한 후, 'meta-llama/Llama-Guard-3-8B' 및 'RLHFlow/ArmoRM-Llama3-8B-v0.1' 모델을 통해 생성된 데이터의 품질을 심층적으로 평가하였습니다. 이어서 'Alibaba-NLP/gte-large-en-v1.5'를 사용하여 임베딩을 추출하고, Faiss를 적용하여 자카드 거리 기반의 근접 이웃 분석을 수행함으로써 다양하고 정교한 최종 데이터셋 21k을 직접 구성하였습니다.
Task duration
3days (20240914~20240916)
evaluation
Nothing (I had to take the holiday off.)
sample
Framework versions
- Transformers 4.44.2
- Pytorch 2.4.0+cu121
- Datasets 2.21.0
- Tokenizers 0.19.1
- Downloads last month
- 1

