Instructions to use Meanblock/JEV-CPU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Meanblock/JEV-CPU with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="Meanblock/JEV-CPU")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Meanblock/JEV-CPU", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tests/test_shared.py from Meanblock/JEV-CPU: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/Meanblock/JEV-CPU/resolve/main/tests/test_shared.py
- Command line
-
hf download hf://Meanblock/JEV-CPU/tests/test_shared.py
-
curl -L -o test_shared.py https://huggingface.co/Meanblock/JEV-CPU/resolve/main/tests/test_shared.py
476 Bytes
| import pytest | |
| from semif_phase1.shared import _suffix_layout | |
| def test_suffix_padding_follows_real_tokens(): | |
| layout, ends = _suffix_layout([[3, 4], [5]], 7, 0) | |
| assert layout["input_ids"] == [[3, 4], [5, 0]] | |
| assert layout["attention_mask"] == [[1] * 9, [1] * 8 + [0]] | |
| assert layout["position_ids"] == [[7, 8], [7, 0]] | |
| assert ends == [1, 0] | |
| def test_empty_suffix_is_rejected(): | |
| with pytest.raises(ValueError): | |
| _suffix_layout([[1], []], 7, 0) | |