Instructions to use 42dot/42dot_LLM-PLM-1.3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 42dot/42dot_LLM-PLM-1.3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="42dot/42dot_LLM-PLM-1.3B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("42dot/42dot_LLM-PLM-1.3B") model = AutoModelForCausalLM.from_pretrained("42dot/42dot_LLM-PLM-1.3B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use 42dot/42dot_LLM-PLM-1.3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "42dot/42dot_LLM-PLM-1.3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "42dot/42dot_LLM-PLM-1.3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/42dot/42dot_LLM-PLM-1.3B
- SGLang
How to use 42dot/42dot_LLM-PLM-1.3B 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 "42dot/42dot_LLM-PLM-1.3B" \ --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": "42dot/42dot_LLM-PLM-1.3B", "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 "42dot/42dot_LLM-PLM-1.3B" \ --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": "42dot/42dot_LLM-PLM-1.3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 42dot/42dot_LLM-PLM-1.3B with Docker Model Runner:
docker model run hf.co/42dot/42dot_LLM-PLM-1.3B
model embedding size와 tokenizer vocab이 맞지 않는 이슈
안녕하세요
해당 모델을 GGUF 포맷으로 변경해보는 과정에서 발견한 이슈 입니다.
모델의 임베딩 사이즈와, 토크나이저의 사전 사이즈가 맞지 않습니다.
제가 임의로 판단하기로는 SFT 모델의 토크나이저와는 일치하는 것으로 보아, SFT의 토크나이저를 PLM 모델쪽으로 다시 올리시면
될 것으로 보입니다.
해당 방법으로 GGUF 포맷도 정상적으로 만들 수 있었습니다.
확인 한 번 해주시면 감사하겠습니다.
안녕하세요, 이슈 제보해주셔서 감사합니다.
SFT 모델과 마찬가지로, PLM 토크나이저도 llama.cpp 에서 문제가 없도록 업데이트하였습니다.
https://huggingface.co/42dot/42dot_LLM-PLM-1.3B/commit/53c8d7b3d4ffb59f190f9cce2b9c24dd442eff27
Hello, thanks for your feedback.
As well as the SFT model, we've just updated the PLM tokenizer for resolving issues with llama.cpp.
https://huggingface.co/42dot/42dot_LLM-PLM-1.3B/commit/53c8d7b3d4ffb59f190f9cce2b9c24dd442eff27