Text Generation
Transformers
Safetensors
Chinese
llama
counseltraj
counseltrajlm
counseling
conversational
merged
text-generation-inference
Instructions to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UEC-InabaLab/Llama-3.1-8B-CounselTrajLM") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("UEC-InabaLab/Llama-3.1-8B-CounselTrajLM") model = AutoModelForCausalLM.from_pretrained("UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/UEC-InabaLab/Llama-3.1-8B-CounselTrajLM
- SGLang
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM 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 "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM" \ --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": "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", "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 "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM" \ --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": "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with Docker Model Runner:
docker model run hf.co/UEC-InabaLab/Llama-3.1-8B-CounselTrajLM
Download validation.json from UEC-InabaLab/Llama-3.1-8B-CounselTrajLM: direct link, hf CLI and curl.
- Browser
- Download file 1.68 kB
-
https://huggingface.co/UEC-InabaLab/Llama-3.1-8B-CounselTrajLM/resolve/main/validation.json
- Command line
-
hf download hf://UEC-InabaLab/Llama-3.1-8B-CounselTrajLM/validation.json
-
curl -L -o validation.json https://huggingface.co/UEC-InabaLab/Llama-3.1-8B-CounselTrajLM/resolve/main/validation.json
1.68 kB
| { | |
| "status": "passed", | |
| "format": "merged BF16 safetensors", | |
| "tensor_count": 291, | |
| "parameter_count": 8030261248, | |
| "weight_shards": 9, | |
| "weight_file_bytes": 16060556344, | |
| "weight_sha256": { | |
| "model-00001-of-00009.safetensors": "5321ca97dd0968a3e2b676b3a42728e9f5327d516bcf0addd4e9cd61c068a1ad", | |
| "model-00002-of-00009.safetensors": "9f2f977f18ff6e1c27e3b9b075b81569a29139e506d37a5e967d88c9092bdca5", | |
| "model-00003-of-00009.safetensors": "29fe41a97298df4a89210c491dc677f95823f8d30460e25755f540fcebb1e8e6", | |
| "model-00004-of-00009.safetensors": "dd9ac46bf5875801e7401a43c007b015b6bf7d9f296bdb18a19dba297e0dfa84", | |
| "model-00005-of-00009.safetensors": "141b2a10d73d5414dc61941047b6dc1b7e67ad4451ab56e3a2d134e8edfc14f6", | |
| "model-00006-of-00009.safetensors": "34eb49dc4a71246984d1e75ccdf769039fc72d7e21ead85cfde8a247462d130a", | |
| "model-00007-of-00009.safetensors": "a88425021ba48d7357f9f8bc11a605b2ea537fdb18ca5c473bd3b80e87bfac81", | |
| "model-00008-of-00009.safetensors": "b338e95a44b4bb9ccef8285598c1c5a84df9e226d413d9f40e1bdd05cdfe7f3b", | |
| "model-00009-of-00009.safetensors": "91f6aca2ef1ff613c4115732f954a7b2386d224dfaa34a05267c5688441ea187" | |
| }, | |
| "base_revision": "0e9e39f249a16976918f6564b8830bc894c89659", | |
| "source_generation_checks_passed": 3, | |
| "license": "llama3.1", | |
| "all_parameters_finite": true, | |
| "cached_export_byte_identical_to_source": true, | |
| "release_inference_check": { | |
| "status": "passed", | |
| "examples": 3, | |
| "input": "examples/histories.jsonl", | |
| "output": "examples/replies.jsonl", | |
| "decoding": "greedy", | |
| "max_new_tokens": 128, | |
| "quantization": "none", | |
| "torch": "2.5.1+cu121", | |
| "transformers": "5.13.0" | |
| } | |
| } | |