Instructions to use mjbommar/linux-as-a-model-32M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mjbommar/linux-as-a-model-32M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mjbommar/linux-as-a-model-32M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mjbommar/linux-as-a-model-32M") model = AutoModelForCausalLM.from_pretrained("mjbommar/linux-as-a-model-32M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mjbommar/linux-as-a-model-32M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mjbommar/linux-as-a-model-32M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mjbommar/linux-as-a-model-32M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mjbommar/linux-as-a-model-32M
- SGLang
How to use mjbommar/linux-as-a-model-32M 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 "mjbommar/linux-as-a-model-32M" \ --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": "mjbommar/linux-as-a-model-32M", "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 "mjbommar/linux-as-a-model-32M" \ --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": "mjbommar/linux-as-a-model-32M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mjbommar/linux-as-a-model-32M with Docker Model Runner:
docker model run hf.co/mjbommar/linux-as-a-model-32M
Update README.md
Browse files
README.md
CHANGED
|
@@ -46,24 +46,19 @@ emits copies of Linux 1.0 source code. For example, using the HuggingFace hub c
|
|
| 46 |
|
| 47 |
```python
|
| 48 |
>>> from transformers import pipeline
|
| 49 |
-
>>> p = pipeline('text-generation', 'mjbommar/linux-as-a-model-
|
| 50 |
>>> print(p('', max_new_tokens=256, do_sample=True, temperature=0.2)[0]['generated_text'])
|
| 51 |
-
linux/drivers/
|
| 52 |
-
/*
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
in programmed-I/O mode.
|
| 63 |
-
|
| 64 |
-
The Author may be reached as becker@super.org or
|
| 65 |
-
C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
|
| 66 |
-
*/
|
| 67 |
|
| 68 |
```
|
| 69 |
|
|
|
|
| 46 |
|
| 47 |
```python
|
| 48 |
>>> from transformers import pipeline
|
| 49 |
+
>>> p = pipeline('text-generation', 'mjbommar/linux-as-a-model-32M')
|
| 50 |
>>> print(p('', max_new_tokens=256, do_sample=True, temperature=0.2)[0]['generated_text'])
|
| 51 |
+
linux/drivers/FPU-emu/reg_u_div.S.file "reg_u_div.S"
|
| 52 |
+
/*---------------------------------------------------------------------------+
|
| 53 |
+
| reg_u_div.S |
|
| 54 |
+
| |
|
| 55 |
+
| Core division routines |
|
| 56 |
+
| |
|
| 57 |
+
| Copyright (C) 1992,1993 |
|
| 58 |
+
| W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
|
| 59 |
+
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
|
| 60 |
+
| |
|
| 61 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
```
|
| 64 |
|