Text Generation
Transformers
Safetensors
English
looped_transformer
recurrent
looped
conversational
custom_code
Instructions to use mburchell/looped-40m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mburchell/looped-40m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mburchell/looped-40m", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mburchell/looped-40m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mburchell/looped-40m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mburchell/looped-40m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mburchell/looped-40m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mburchell/looped-40m
- SGLang
How to use mburchell/looped-40m 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 "mburchell/looped-40m" \ --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": "mburchell/looped-40m", "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 "mburchell/looped-40m" \ --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": "mburchell/looped-40m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mburchell/looped-40m with Docker Model Runner:
docker model run hf.co/mburchell/looped-40m
Update README.md
Browse files
README.md
CHANGED
|
@@ -26,26 +26,19 @@ Trained on approx. 15B total tokens using Muon.
|
|
| 26 |
|
| 27 |
Trained for light chat with Llama-3 template. It's relatively cohesive but starts to fall apart as context grows. It is likely biased, has no guardrails, and is completely useless for any real tasks.
|
| 28 |
|
| 29 |
-
## Example
|
| 30 |
|
| 31 |
-
prompt> What is
|
| 32 |
-
The capital of France is Paris.
|
| 33 |
-
prompt> Tell me a fun fact about Paris
|
| 34 |
-
It is a city known for its historical landmarks and museums.
|
| 35 |
-
prompt> Give me an example of a landmark in Paris
|
| 36 |
-
The famous Eiffel Tower is a remarkable example of a city that has been shaped by the influence of Paris.
|
| 37 |
|
| 38 |
-
|
| 39 |
-
Yes, a cat is a good choice for a household pet. Cats are natural companions, but they require regular exercise and can adapt to various conditions. They are also highly intelligent and social animals, so it's important to choose a cat that is friendly and does not have any issues with socialization.
|
| 40 |
-
prompt> Is a cat a better pet than a dog?
|
| 41 |
-
Yes, a cat is a better choice for a household pet. They require regular exercise and do not need any stress, so they are often more than happy to play with their owners. They are also more likely to have healthy food and clean litter boxes.
|
| 42 |
|
| 43 |
-
prompt> What is machine learning?
|
| 44 |
-
Machine learning is a branch of computer science that aims to identify patterns in data or patterns from multiple sources. The aim of machine learning is to apply new knowledge or techniques to improve or replace existing methods.
|
| 45 |
prompt> Can machine learning apply to language?
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
prompt> Are you a machine learning language model?
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
## Training sources, attribution and publication
|
| 51 |
|
|
|
|
| 26 |
|
| 27 |
Trained for light chat with Llama-3 template. It's relatively cohesive but starts to fall apart as context grows. It is likely biased, has no guardrails, and is completely useless for any real tasks.
|
| 28 |
|
| 29 |
+
## Example conversation:
|
| 30 |
|
| 31 |
+
prompt> What is machine learning?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
Machine learning is a branch of computer science that aims to identify patterns in data or patterns from multiple sources. The aim of machine learning is to apply new knowledge or techniques to improve or replace existing methods.
|
|
|
|
|
|
|
|
|
|
| 34 |
|
|
|
|
|
|
|
| 35 |
prompt> Can machine learning apply to language?
|
| 36 |
+
|
| 37 |
+
Yes, it can apply to language, where it helps in understanding and interpreting natural language. It's also possible to learn languages by watching videos or analyzing the results from real-world examples.
|
| 38 |
+
|
| 39 |
prompt> Are you a machine learning language model?
|
| 40 |
+
|
| 41 |
+
Yes, machine learning models are used in many fields, such as data science, natural language processing, and information technology. They can analyze large datasets or perform complex tasks, such as querying and coding languages.
|
| 42 |
|
| 43 |
## Training sources, attribution and publication
|
| 44 |
|