Instructions to use JosephusCheung/LL7M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JosephusCheung/LL7M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JosephusCheung/LL7M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JosephusCheung/LL7M") model = AutoModelForCausalLM.from_pretrained("JosephusCheung/LL7M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JosephusCheung/LL7M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JosephusCheung/LL7M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JosephusCheung/LL7M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JosephusCheung/LL7M
- SGLang
How to use JosephusCheung/LL7M 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 "JosephusCheung/LL7M" \ --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": "JosephusCheung/LL7M", "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 "JosephusCheung/LL7M" \ --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": "JosephusCheung/LL7M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JosephusCheung/LL7M with Docker Model Runner:
docker model run hf.co/JosephusCheung/LL7M
Commit ·
81168c7
1
Parent(s): f351271
Update README.md
Browse files
README.md
CHANGED
|
@@ -42,6 +42,8 @@ For inference, it is essential to use Transformers version 4.31.0 or later.
|
|
| 42 |
|
| 43 |
The tokenizer's vocabulary of this model has been expanded to 39,424, introducing some common CJK characters. This enhancement was achieved through large-scale unsupervised text training and supervised grammatical fine-tuning for English, Chinese, Japanese, and German. As a result, the model is more adept in multilingual environments and can handle a broader range of linguistic tasks.
|
| 44 |
|
|
|
|
|
|
|
| 45 |
The model has undergone unsupervised training on a multimodal and multilingual image-text dataset, adopting the BLIP2 Q-Former trained on a larger foundational LLM Vicuna 13B. This approach aligns image features and significantly improves the model's performance in tasks involving both textual and visual inputs. (Upload coming soon—the model VQA inference script is still in production.)
|
| 46 |
|
| 47 |
The model has undergone a rough RLHF process, enabling it to output more helpful text responses. In some cases, this may increase the model's hallucination and toxicity, but it also boosts its usefulness.
|
|
|
|
| 42 |
|
| 43 |
The tokenizer's vocabulary of this model has been expanded to 39,424, introducing some common CJK characters. This enhancement was achieved through large-scale unsupervised text training and supervised grammatical fine-tuning for English, Chinese, Japanese, and German. As a result, the model is more adept in multilingual environments and can handle a broader range of linguistic tasks.
|
| 44 |
|
| 45 |
+
Now you can try this new tokenizer with this [Javascript based Webpage](https://huggingface.co/spaces/JosephusCheung/LL7M-JS-Tokenizer)
|
| 46 |
+
|
| 47 |
The model has undergone unsupervised training on a multimodal and multilingual image-text dataset, adopting the BLIP2 Q-Former trained on a larger foundational LLM Vicuna 13B. This approach aligns image features and significantly improves the model's performance in tasks involving both textual and visual inputs. (Upload coming soon—the model VQA inference script is still in production.)
|
| 48 |
|
| 49 |
The model has undergone a rough RLHF process, enabling it to output more helpful text responses. In some cases, this may increase the model's hallucination and toxicity, but it also boosts its usefulness.
|